I have got some illumina data in a a merged BAM file for a particular sample and I would like to convert it back to per lane data files (BAM or fastq) so it would be compatible with the analysis pipeline. Any ideas on the best way to do this?
Seqanswers Leaderboard Ad
Collapse
Announcement
Collapse
No announcement yet.
X
-
When I did this a few days ago (with only knowledge of command-line stuff and samtools), here's a rough guide to what I did:- Extract header from BAM file
Code:
samtools view -H infile.bam > header.sam
- filter out lanes from BAM file, add header
Code:
(cat header.sam; samtools view infile.bam | grep '^DATA...._<lane>_.') > out_lane<lane>.sam
- convert SAM to BAM
Code:
samtools view -S out_lane<lane>.sam -b > out_lane<lane>.bam
There's probably some better way, but it would have taken longer for me to find than for me to just do it and deal with the additional overhead of storing temporary SAM files per lane.
- Extract header from BAM file
-
If the lane info is stored in RG tags you can use this: http://genome.sph.umich.edu/wiki/SplitBam
Comment
-
SplitBam looks ideal, but I can't find a download link for it. Any ideas?
And thanks for the other suggestion too, that makes a lot of sense.
--EDIT--
Actually it looks like there are no @RG in the headers ... Oh Dear.Last edited by danielsbrewer; 09-29-2011, 01:03 AM.
Comment
-
Originally posted by danielsbrewer View PostSplitBam looks ideal, but I can't find a download link for it. Any ideas?
And thanks for the other suggestion too, that makes a lot of sense.
--EDIT--
Actually it looks like there are no @RG in the headers ... Oh Dear.Originally posted by jtladner View PostI am trying to do the exact same thing and I do have @RG tags, but I can not find a download link for SplitBam. Does anyone know how to download this program?
Jason
Comment
-
Originally posted by jtladner View PostI am trying to do the exact same thing and I do have @RG tags, but I can not find a download link for SplitBam. Does anyone know how to download this program?
Jason
splitBam is part of the bamUtil package, which i found it here https://github.com/Homebrew/homebrew-science and it was very easy to download it.
Comment
Latest Articles
Collapse
-
by seqadmin
Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.
Long-Read Sequencing
Long-read sequencing has...-
Channel: Articles
12-02-2024, 01:49 PM -
-
by seqadmin
The field of immunogenetics explores how genetic variations influence immune responses and susceptibility to disease. In a recent SEQanswers webinar, Oscar Rodriguez, Ph.D., Postdoctoral Researcher at the University of Louisville, and Ruben MartÃnez Barricarte, Ph.D., Assistant Professor of Medicine at Vanderbilt University, shared recent advancements in immunogenetics. This article discusses their research on genetic variation in antibody loci, antibody production processes,...-
Channel: Articles
11-06-2024, 07:24 PM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, 12-02-2024, 09:29 AM
|
0 responses
149 views
0 likes
|
Last Post
by seqadmin
12-02-2024, 09:29 AM
|
||
Started by seqadmin, 12-02-2024, 09:06 AM
|
0 responses
51 views
0 likes
|
Last Post
by seqadmin
12-02-2024, 09:06 AM
|
||
Started by seqadmin, 12-02-2024, 08:03 AM
|
0 responses
42 views
0 likes
|
Last Post
by seqadmin
12-02-2024, 08:03 AM
|
||
Started by seqadmin, 11-22-2024, 07:36 AM
|
0 responses
73 views
0 likes
|
Last Post
by seqadmin
11-22-2024, 07:36 AM
|
Comment