Thread: Script Help
View Single Post
Old 07-14-2011, 08:56 PM   #2
Kennels
Senior Member
 
Location: Sydney

Join Date: Feb 2011
Posts: 149
Default

If it's ok with perl, here's a simple perl one liner:

Code:
perl -e ' $pos=1; while(<>) { $line=$_; print "$pos\t$line"; $pos+=10; } ' inputfile.txt > outputfile.txt
replace inputfile.txt with your file containing your reads, and outputfile.txt with a desired output file name.

I'm assuming you want the position of the base at the start of every line. You can replace the '10' in the code if you desire another increment. The delimiter here is a tab (\t).
Kennels is offline   Reply With Quote