Last active
August 29, 2015 14:18
-
-
Save sestaton/09781a5ac8849753d6ed to your computer and use it in GitHub Desktop.
trim sra files and repair the reads
This file contains 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
#!/bin/bash | |
## fetch the archive | |
wget ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR156/SRR1561197/SRR1561197.sra | |
## extract the pairs | |
fastq-dump -F --split-files ./SRR1561197.sra | |
## trim | |
fastq_quality_filter -i SRR1561197_1.fastq -q 28 -p 100 -Q33 -o SRR1561197_1_filt.fastq | |
fastq_quality_filter -i SRR1561197_2.fastq -q 28 -p 100 -Q33 -o SRR1561197_2_filt.fastq | |
## add pair info to reads and remove comment to reduce size | |
curl -sL git.io/pairfq_lite | perl - addinfo -i SRR1561197_1_filt.fastq -o SRR1561197_1_filt_info.fastq -p 1 | |
curl -sL git.io/pairfq_lite | perl - addinfo -i SRR1561197_2_filt.fastq -o SRR1561197_2_filt_info.fastq -p 2 | |
## pair the reads | |
time curl -sL git.io/pairfq_lite | perl - makepairs -f SRR1561197_1_filt_info.fastq \ | |
-r SRR1561197_2_filt_info.fastq \ | |
-fp SRR1561197_1_filt_info_p.fastq \ | |
-rp SRR1561197_2_filt_info_p.fastq \ | |
-fs SRR1561197_1_filt_info_s.fastq \ | |
-rs SRR1561197_2_filt_info_s.fastq \ | |
--stats |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment