Skip to content

Instantly share code, notes, and snippets.

@sashaphanes
Created October 17, 2012 21:11
Show Gist options
  • Save sashaphanes/3908217 to your computer and use it in GitHub Desktop.
Save sashaphanes/3908217 to your computer and use it in GitHub Desktop.
convert colorspace from SOLiD to basespace using STDIN
#!/usr/bin/perl -sw
while (<>) {
if(!(/^[ACGT0123NX\.]+$/)){
print;
next;
}
while(/[ACGT][0123]/){
s/A0/AA/;s/C0/CC/;s/G0/GG/;s/T0/TT/;
s/A1/AC/;s/C1/CA/;s/G1/GT/;s/T1/TG/;
s/A2/AG/;s/C2/CT/;s/G2/GA/;s/T2/TC/;
s/A3/AT/;s/C3/CG/;s/G3/GC/;s/T3/TA/;
}
print;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment