Question: cn-mops Error "Missing refSeqName"
gravatar for karim
23 months ago by
karim20 wrote:

Hey together,

I started to work with cn-mops, but got all the time the same Error, after I start the program:


BAMFiles <- list.files(pattern=".bam$")

bamDataRanges <- getReadCountsFromBAM(BAMFiles, mode="unpaired")
Identified the following reference sequences:  chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY,chrM
Missing "refSeqName"! Selecting chr1 as reference sequence.
Note that this function is much faster, if the indices of the BAM files are present.
Missing "WL"! cn.mops will suggest an appropiate value for the window length.
Window length set to: 197000
Reading file: 1_V22_T21_12P.bam

Reading file: 2_V22_T18_12P.bam

So I looked at the header of my BAM-Files, which look like this:

@HD VN:1.4  SO:coordinate
@SQ SN:chr1 LN:249250621
@SQ SN:chr2 LN:243199373
@SQ SN:chr3 LN:198022430
@SQ SN:chr4 LN:191154276
@SQ SN:chr5 LN:180915260
@SQ SN:chr6 LN:171115067
@SQ SN:chr7 LN:159138663
@SQ SN:chr8 LN:146364022
@SQ SN:chr9 LN:141213431
@SQ SN:chr10    LN:135534747
@SQ SN:chr11    LN:135006516
@SQ SN:chr12    LN:133851895
@SQ SN:chr13    LN:115169878
@SQ SN:chr14    LN:107349540
@SQ SN:chr15    LN:102531392
@SQ SN:chr16    LN:90354753
@SQ SN:chr17    LN:81195210
@SQ SN:chr18    LN:78077248
@SQ SN:chr19    LN:59128983
@SQ SN:chr20    LN:63025520
@SQ SN:chr21    LN:48129895
@SQ SN:chr22    LN:51304566......

and saw, that I really have no refSeqName in my Bam Header. Any Ideas how I can add the "refSeqName" and how it has to look like? for example:

 "@HD   VN:1.4  SO:coordinateref       SeqName: hg19"

Thanks for your help! Karim

cnmops refseqname cn-mops R • 805 views
ADD COMMENTlink modified 23 months ago by Devon Ryan82k • written 23 months ago by karim20
gravatar for Devon Ryan
23 months ago by
Devon Ryan82k
Freiburg, Germany
Devon Ryan82k wrote:

You don't need to add a refSeqName to any file and doing so will likely break things. That's an option to the function you're calling. You haven't received an error at all.

ADD COMMENTlink written 23 months ago by Devon Ryan82k

That mean I just can add "refSeqName" as option? And can say, that the function should take all chromosomes as reference? Like:

bamDataRanges <- getReadCountsFromBAM(BAMFiles, mode="unpaired", refSeqName=c("chr1", "chr2"....))

something like this?

ADD REPLYlink written 23 months ago by karim20

Yeah, though I think you have to do one chromosome at a time.

ADD REPLYlink written 23 months ago by Devon Ryan82k

Have a small difference in opinion.

cn.MOPS can take multiple chromosomes/scaffolds in a single go.

Get all the chromosomes of interest into a file, lets say chrList.txt. Then give


as an argument for bamDataRanges() function.

When the reference has lots of scaffolds rather than few chromosomes, this list in a file method comes very handy.

ADD REPLYlink written 23 months ago by Jeffin Rockey660
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1369 users visited in the last hour