Cutadapt: How to write the trimmed sequences to file
1
0
Entering edit mode
7.4 years ago
ssm87 • 0

I'm using cutadapt to cut the first 9 bp from 150PE reads. I would like to output all the first 9 bp that were cut so that I can calculate the frequency of the 9 base pairs in the sequencing data. I want to know the distribution of the first 9 bp in my sequencing data.

This is what I have so far

$ cutadapt -u 9 -o trimmed.fastq reads.fastq

My question is: Is there an option in cutadapt to output the bases that I trimmed? It would be helpful if I could get them in table with the counts of each. I tried looking in the cutadapt manual but couldn't find anything. If cutadapt doesn't have an option, can someone suggest how I can figure out the distribution of the first 9 bp in my sequencing data? Thanks

cutadapt trimming • 2.4k views
ADD COMMENT
3
Entering edit mode
7.4 years ago

Using the BBMap package:

You can see the base frequency composition of the first 9 bases like this:

reformat.sh in=reads.fastq bhist=bhist.txt

You can collect the first 9 bases into a file like this:

reformat.sh in=reads.fastq out=9.fastq ftr=8

If you want to look at the distribution of these 9-mers, you can do so with KmerCountExact:

kmercountexact.sh in=9.fastq khist=khist.txt out=counts.txt rcomp=f k=9
ADD COMMENT

Login before adding your answer.

Traffic: 2024 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