bbduk.sh trimming to BAM output file
1
0
Entering edit mode
3 days ago
bge • 0

Hi,

I want to use bbduk.sh to trim reads in a uBAM file and write the trimmed reads to a new uBAM file. It appears that the reads in the output file are not trimmed.

One set of bbduk.sh parameters that I tried is

literal=polyA k=12 mink=11 ktrim=r trimclip=t

I see trimmed reads when the output file format is fastq but not when BAM or SAM.

Perhaps I am missing something?

Thank you!

Brent

bbduk.sh • 223 views
ADD COMMENT
0
Entering edit mode
3 days ago
GenoMax 150k

Using a uBAM input and writing uBAM output is indeed not working directly. Probably because it is an edge case that @Brian likely did not test/code for.

Following seems to work for me for a single-end read file. Convert uBAM to fastq | trim using bbduk | write the result out as uBAM.

$ reformat.sh -Xmx3g in=test.bam out=stdout.fq int=f | bbduk.sh -Xmx3g in=stdin.fq out=stdout.fq int=f forcetrimleft=10 | reformat.sh -Xmx3g in=stdin.fq out=trimmed.bam int=f
ADD COMMENT
0
Entering edit mode

Hi,

I appreciate the confirmation -- I worry that I mess up.

Anyway, the input uBAM file has a tag with the barcode+umi sequences required by STARsolo. I don't see a straightforward way to preserve this information with a conversion to fastq.

Do you know whether this program is maintained?

Thank you!

Brent

ADD REPLY
0
Entering edit mode

BBMap is actively maintained but what you have is an edge case. You can try writing to Brian Bushnell (his email can be found in software in-line help).

Why do you need to trim the data? STARsolo may be able to handle it as is.

ADD REPLY

Login before adding your answer.

Traffic: 1640 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6