Batch trimming Poly-A tails

To assemble transcripts from RNA-seq short reads, one needs to trim the poly-A tails first. Several packages exits for that needs, including trimpoly in the seqclean package, and trimest from the EMBOSS package. I prefer trimest.

Like described in my previous blogs, I like to store a list of fastq files in a text file so that the entire project can be easily wrapped into some workflow. The following bash code does the poly-A trimming for every fastq file in the list.

while read line; do
   name=`basename $line`;
   echo Trimming $name;
   output=${name/trimmed.fastq/poly_AT_trimmed.fasta};
   trimest $line $output;
done < trimmed_fastq_list.txt
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s