This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Trim each read from bam file

Hi. I'm trying to trim each reads in bam. I want to crop not whole reads but each read, so I don't think trimBam is good way.

How can I do this ?

bam pysam trimbam

Your question lacks any details. What do you want to trim? What is not whole reads but each read? Please give representative examples.

Sorry, my words was not enough. I want to do bootstrap method. Thus I sampled randomly from bam file, and made subsampled.bam. On the top of that, I want to crop read randomly from subsampled.bam.

Ex.

[pre bam]

read1 150b

read2 150b

read3 150b

[trimmed bam]

read1 100b (trimmed 50b)

read2 150b (trimmed 0b)

read3 20b (trimmed 130b)

Do you understand what I mean?

0 answers

No answers yet.

Log in to answer this question.