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
1 answer
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
Log in to answer this question.