How can I generate sequences from a bam/sam file starting at a specific position and remove what is before this position? Thank you!
How can I generate sequences from a bam/sam file starting at a specific position and remove what is before this position? Thank you!
I'm deeply sorry if my question was obscure: what I want to do is to get, from an alignment, reads without nucleic bases before position 30 of the reference sequence. Is it possible to crop a bam file?
curiousbiologist wants individual reads chopped so they start and end at a specific position i.e. nothing should extend to left or right of an interval a <--> b
Yes you got it genomax2. I want to have several (and switchable) windows of reads from different samples in order to compare them using different score calculations; stats, entropy (shannon entropy score). If I haven't same size of reads pieces, my results will be misrepresented
would it be possible to resolve this problem using an awk script? I was thinking of an alignment, conversion to fasta (with gap or x for non-aligned bases) and then trimming using awk or fastx_trimmer? Maybe there is something easier? how do I get gap or 'x' for non-aligned bases before and after each reads?
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
To me, it's unclear what you are asking for. Is this the same as alignment containing sequences from position a to b ? What do you want to obtain? "Sequences"? Is that a read/fasta/fastq/reference/variant...?
I would like to obtain a bam "cropped" (all my reads aligned and starting at a defined position)
One of the options in this threads should do this: How to get the consensus sequence from a BAM alignment
I would like to play with all the selected reads after, I'm not sure consensus is a good approach