Skip to content

Instantly share code, notes, and snippets.

@Tabea-K
Last active June 1, 2016 12:34
Show Gist options
  • Save Tabea-K/f6760a438e7860d48a7f to your computer and use it in GitHub Desktop.
Save Tabea-K/f6760a438e7860d48a7f to your computer and use it in GitHub Desktop.
convert fasta to fastq, using a single character for quality ("I"). This is useful for creating dummy files to use for debugging.
awk '/^>/ {printf("\n%s\n",$0);next; } { printf("%s",$0);} END {printf("\n");}' | awk 'BEGIN {RS = ">" ; FS = "\n"} NR > 1 {print "@"$1"\n"$2"\n+"$1"\n"gensub(/./, "I", "g", $2)}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment