For a specific application I need to display the 5' ends of reads in a genome browser - so far I haven't found a way to easily trim all the reads in a BAM file down to the first basepairs. I obviously need to retain mapping information so I can't just trim the reads in FASTQ.
Seqanswers Leaderboard Ad
Collapse
Announcement
Collapse
No announcement yet.
X
-
Define "retain mapping information"; do you need the information provided by the CIGARs? If you don't, such trimming is straightforward with a simple script chopping off the bases and qualities in the BAM (pipe "samtools view -h" into a script which skips over the headers, then for each line cuts down columns 10 and 11 to the desired length, and just replaces the CIGAR field with a *, piped into "samtools view -bS").
If you need to retain the information in the CIGARs properly, it becomes more messy, as you'd want to think about how to handle soft-clippings and indels.
-
Ok, so something along the lines of what's suggested in http://seqanswers.com/forums/showpos...53&postcount=2.
I don't think SeqMonk cares about the CIGAR information, so it should be fine.
Comment
-
Yes, basically. I'd really replace the CIGAR with a * though, to make the SAM/BAM file standardized. You might want to check how to decide on which side of the read sequence in the BAM is 5'/3' (in the read, not alignment sense as I understand the SAM spec) however, didn't think about that.
Comment
Latest Articles
Collapse
-
by seqadmin
The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...-
Channel: Articles
04-22-2024, 07:01 AM -
-
by seqadmin
Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...-
Channel: Articles
04-04-2024, 04:25 PM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, Today, 11:49 AM
|
0 responses
12 views
0 likes
|
Last Post
by seqadmin
Today, 11:49 AM
|
||
Started by seqadmin, Yesterday, 08:47 AM
|
0 responses
16 views
0 likes
|
Last Post
by seqadmin
Yesterday, 08:47 AM
|
||
Started by seqadmin, 04-11-2024, 12:08 PM
|
0 responses
61 views
0 likes
|
Last Post
by seqadmin
04-11-2024, 12:08 PM
|
||
Started by seqadmin, 04-10-2024, 10:19 PM
|
0 responses
60 views
0 likes
|
Last Post
by seqadmin
04-10-2024, 10:19 PM
|
Comment