Talk:Converting FASTQ to FASTA QUAL files

From BioPerl
Jump to: navigation, search

Critiques

I'm more than open to critiques, and I am curious how it performs on other systems. --Lskatz 23:16, 11 April 2011 (UTC)

This should probably be added to Category:Scrapbook. --Chris Fields 15:38, 12 April 2011 (UTC)

I added the category --Lskatz 19:55, 13 April 2011 (UTC)

perl one-liners

I came across a computer without bioperl and in my frustration, I wrote a couple of one liners to get the quality scores out. I didn't put the one lines onto the main page because it's bioperl, but I thought it was worth helping out those who need to dig around for a solution. It turns out that these one-liners are pretty fast too!

file=file.fastq

perl -lane '$i++; if($i%4==1){s/^@/>/; print;} elsif($i%4==2){print;}' < $file > $file.fasta

perl -lane '$i++; if($i%4==1){s/^@/>/; print;} elsif($i%4==0){chomp; @q=split //; @q=map(ord($_)-33,@q);print join(" ",@q)."\n";}' < $file > $file.qual

--Lskatz 21:30, 2 October 2012 (UTC)

Personal tools
Namespaces
Variants
Actions
Main Links
documentation
community
development
Toolbox