Thank you for taking the time to look at this.
I have a fastq file and I want to translate it to the complementary, but not the reverse complementary, something like this:
@Some header example:1:
ACTGAGACTCGATCA
+
S0m3_Qu4l1t13s&
Translated to
@Some header example:1:
TGACTCTGAGCTAGT
+
S0m3_Qu4l1t13s&
And the code I used is:
awk '{
if(NR==100000){break}
else if((NR+2) % 4 ==0 ){ system("echo " $0 "| tr ATGC TACG") }
else print $0}' MyFastqFyle.fastq > MyDesiredFile.fastq
And it works! but this approach is slooooooooow, even with small files (250M). I wonder which other way will get this done faster, doesn't matter if this is in R or bash or similar.
(I looked at BioStrings But I only found the reverse complimentary function, and there are some issues with the "@" in the header instead of the ">")