Hello,everyone. I'm suing: 'samtools view -c file.sorted.map chr1' to count the reads from the region "chr", but 'region"chr1" specifies an unknown reference name. Continue anyway.' is all I got. Anything wrong with the language or something else?
Seqanswers Leaderboard Ad
Collapse
Announcement
Collapse
No announcement yet.
X
-
What are your reference names? You obviously believe that 'chr1' is one of your reference names but maybe it is not? For example in one of the BAM files I have handy, the references are called 'Group2', etc. so I can do:
samtools view -c wt.sr.bam Group2
But if I do a
samtools view -c wt.sr.bam chr1
Then I get the error you described.
In order to see your reference name I suggest doing a:
samtools view file.sorted.map | more
-
thanks a lot westerman, the "chr1" is not my reference file, I guess the "chr1" string for hg19 refseq is enough for the region option? Should the 'region' be specified with the exactly same name as in the refseq, such like '>chr1_1:+' ? Or should I first pool the reference info into the memory then delivery them to the samtools view command, like:
cat reference.fa|samtools view myfile.sorted.bam chr1?
I tried in many ways, but still can not make this out.Last edited by Kelly Lynn; 06-11-2011, 09:18 AM.
Comment
-
Kelly Lynn,
Sorry if this is an overly obvious question, but are you using a .bam or .sam file when you mention "file.sorted.map"? And if you are specifying a chromosome, then you must be using an indexed .BAM file.
Supposing you are using something like file.sorted.bam (with the index file.sorted.bam.bai in the same directory), maybe you could try this for your command line:
Code:samtools view -c file.sorted.bam chr1
Comment
-
Originally posted by Kelly Lynn View Postthanks a lot westerman, the "chr1" is not my reference file, I guess the "chr1" string for hg19 refseq is enough for the region option? Should the 'region' be specified with the exactly same name as in the refseq, such like '>chr1_1:+' ? Or should I first pool the reference info into the memory then delivery them to the samtools view command, like:
cat reference.fa|samtools view myfile.sorted.bam chr1?
I tried in many ways, but still can not make this out.
samtools view file.sorted.map | more
And paste into this thread the the first two output lines that contain reads. From my, admitted small, experience with hg19 your reference should be in the form 'chr1'. But we need to be sure. So pasting in those lines will give us a clue.
Comment
Latest Articles
Collapse
-
by seqadmin
The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...-
Channel: Articles
05-06-2024, 07:48 AM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, Yesterday, 02:06 PM
|
0 responses
7 views
0 likes
|
Last Post
by seqadmin
Yesterday, 02:06 PM
|
||
Started by seqadmin, 05-14-2024, 07:03 AM
|
0 responses
27 views
0 likes
|
Last Post
by seqadmin
05-14-2024, 07:03 AM
|
||
Started by seqadmin, 05-10-2024, 06:35 AM
|
0 responses
47 views
0 likes
|
Last Post
by seqadmin
05-10-2024, 06:35 AM
|
||
Started by seqadmin, 05-09-2024, 02:46 PM
|
0 responses
59 views
0 likes
|
Last Post
by seqadmin
05-09-2024, 02:46 PM
|
Comment