I got similar problem:
I downloaded sam files from recent published study.
Each sam file contains alignments of the reads to a single chromosome (hg19).
I want to merge alignments into one file.
Every sam file have only @SQ as header of its chromosome.
For example:
in chrY.sam
@SQ SN:chrY LN:59373566
in chrM.sam
@SQ SN:chrM LN:16571
I used:
samtools view -T /data/pipeline_in/Genomes/Human_GRCh37/all.fa -Sb chrY.sam | samtools sort - chrY.sam.sorted
samtools view -T /data/pipeline_in/Genomes/Human_GRCh37/all.fa -Sb chrM.sam | samtools sort - chrM.sam.sorted
Then in order to merge them:
samtools merge out chrM.sam.sorted.bam chrY.sam.sorted.bam
I got this error:
[bam_merge_core] different target sequence name: 'chrM' != 'chrY' in file 'chrY.sam.sorted.bam'
What I need to do?
from searching the net I got some clues this error is connected to the header?
Do I need to replace the headers of the primary sam files?
Where I find proper example for header?
Thanks in advance,
Oz Solomon
Header Leaderboard Ad
Collapse
samtools merge
Collapse
Announcement
Collapse
No announcement yet.
X
-
Originally posted by frymor View PostThis is exactly my problem. tophat produces no header in the bam file.
Can I change the setting so that tophat will create a header?
Is there a header in the (temporary) sam files from tophat?
Is it enough just to copy paste the header from the bam file from bowtie into the one from tophat?
cheers
Leave a comment:
-
Originally posted by nilshomer View PostMake sure that the SQ lines in the header are the same (use samtools view -H). You will also need to sort them before merging (samtools sort).
Can I change the setting so that tophat will create a header?
Is there a header in the (temporary) sam files from tophat?
Is it enough just to copy paste the header from the bam file from bowtie into the one from tophat?
Leave a comment:
-
Make sure that the SQ lines in the header are the same (use samtools view -H). You will also need to sort them before merging (samtools sort).
Leave a comment:
-
samtools merge
Hallo everybody,
I am running a bowtie assembly for drosophila.
After the bowtie is finished I'm piping the unmapped reads to tophat to see if I can map some more reads onto the same reference genome.
The sam out from bowtie I than convert into bam and tophat make automatically a bam file
After finishing both runs, I would like to combine both bam files with the samtools merge command:
Code:samtools merge -h dilptotal.sam dilptotal_2.bam dilptotal_bowtie.bam dilp_tophat.bam
Code:[bam_merge_core] different target sequence name: 'YHet' != '2L' in file 'dilp_tophat.bam'
I used for both runs the same reference genome. in both there are the chromosomes "2L' and 'YHet'.
YHet is the heterochromatin part of the Y chromosome. It comes 4 times in the sorted bowtie bam file but over 4500 times in the sorted tophat bam file.
'2L' reads I have many millions in both files.
why does it has this problem? Is it because I don't have a header in my tophat output file with the chromosomes (@SQ)?
can I set tophat to have an header in the sam or bam files?
Thanks for ant advice,
Assa
Latest Articles
Collapse
-
by seqadmin
Amplicon sequencing is a targeted approach that allows researchers to investigate specific regions of the genome. This technique is routinely used in applications such as variant identification, clinical research, and infectious disease surveillance. The amplicon sequencing process begins by designing primers that flank the regions of interest. The DNA sequences are then amplified through PCR (typically multiplex PCR) to produce amplicons complementary to the targets. RNA targets...-
Channel: Articles
03-21-2023, 01:49 PM -
-
by seqadmin
Targeted sequencing is an effective way to sequence and analyze specific genomic regions of interest. This method enables researchers to focus their efforts on their desired targets, as opposed to other methods like whole genome sequencing that involve the sequencing of total DNA. Utilizing targeted sequencing is an attractive option for many researchers because it is often faster, more cost-effective, and only generates applicable data. While there are many approaches...-
Channel: Articles
03-10-2023, 05:31 AM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, Yesterday, 12:26 PM
|
0 responses
7 views
0 likes
|
Last Post
by seqadmin
Yesterday, 12:26 PM
|
||
Started by seqadmin, 03-17-2023, 12:32 PM
|
0 responses
14 views
0 likes
|
Last Post
by seqadmin
03-17-2023, 12:32 PM
|
||
Started by seqadmin, 03-15-2023, 12:42 PM
|
0 responses
21 views
0 likes
|
Last Post
by seqadmin
03-15-2023, 12:42 PM
|
||
Started by seqadmin, 03-09-2023, 10:17 AM
|
0 responses
68 views
1 like
|
Last Post
by seqadmin
03-09-2023, 10:17 AM
|
Leave a comment: