-
-
Save wakimchris/0f69dfc22cc1f4b2cb6d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl -sw | |
| # sample inputs: | |
| #ILLUMINA-A93428 66 1 1 7848 1267 CGATGT 1 ATGTTGGCTGGCGGTGAAATAAATCTCAAACGTACCTGTTACAAAATTGTGTTAATCCTTTCAGATTCGCAG ggggggggggggggcfdffdgggfefffffcfcffcccacBeddddded_cffefgggggBBBBBBBBBBBB chrX.fa 122287709 R 40C21GAC7 269 Y | |
| # output for sample input: | |
| #@ILLUMINA-A93428:66:1:1:7848:1267:#CGATGT/1 | |
| #ATGTTGGCTGGCGGTGAAATAAATCTCAAACGTACCTGTTACAAAATTGTGTTAATCCTTTCAGATTCGCAG | |
| #+ILLUMINA-A93428:66:1:1:7848:1267:#CGATGT/1 | |
| #ggggggggggggggcfdffdgggfefffffcfcffcccacBeddddded_cffefgggggBBBBBBBBBBBB | |
| # command line: | |
| # perl txtToFastq.pl < sampleInput.txt > output.fastq | |
| while (<>){ | |
| chomp; | |
| my @parts = split (/\s+/, $_); | |
| print "@","$parts[0]:$parts[1]:$parts[2]:$parts[3]:$parts[4]:$parts[5]:#$parts[6]/$parts[7]\n"; | |
| print "$parts[8]\n"; | |
| print "+","$parts[0]:$parts[1]:$parts[2]:$parts[3]:$parts[4]:$parts[5]:#$parts[6]/$parts[7]\n"; | |
| print "$parts[9]\n"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment