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
Non-coding RNAs (ncRNAs) do not code for proteins but play important roles in numerous cellular processes including gene silencing, developmental pathways, and more. There are numerous types including microRNA (miRNA), long ncRNA (lncRNA), circular RNA (circRNA), and more. In this article, we discuss innovative ncRNA research and explore recent technological advancements that improve the study of ncRNAs.
Nobel Prize for MicroRNA Discovery
This week,...-
Channel: Articles
Yesterday, 08:07 AM -
-
by seqadmin
Metagenomics has improved the way researchers study microorganisms across diverse environments. Historically, studying microorganisms relied on culturing them in the lab, a method that limits the investigation of many species since most are unculturable1. Metagenomics overcomes these issues by allowing the study of microorganisms regardless of their ability to be cultured or the environments they inhabit. Over time, the field has evolved, especially with the advent...-
Channel: Articles
09-23-2024, 06:35 AM -
-
by seqadmin
During the COVID-19 pandemic, scientists observed that while some individuals experienced severe illness when infected with SARS-CoV-2, others were barely affected. These disparities left researchers and clinicians wondering what causes the wide variations in response to viral infections and what role genetics plays.
Jean-Laurent Casanova, M.D., Ph.D., Professor at Rockefeller University, is a leading expert in this crossover between genetics and infectious...-
Channel: Articles
09-09-2024, 10:59 AM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, 10-02-2024, 04:51 AM
|
0 responses
72 views
0 likes
|
Last Post
by seqadmin
10-02-2024, 04:51 AM
|
||
Started by seqadmin, 10-01-2024, 07:10 AM
|
0 responses
84 views
0 likes
|
Last Post
by seqadmin
10-01-2024, 07:10 AM
|
||
Started by seqadmin, 09-30-2024, 08:33 AM
|
1 response
86 views
0 likes
|
Last Post
by EmiTom
Yesterday, 06:46 AM
|
||
Started by seqadmin, 09-26-2024, 12:57 PM
|
0 responses
20 views
0 likes
|
Last Post
by seqadmin
09-26-2024, 12:57 PM
|
Comment