#!/usr/bin/env sh trimmomatic PE -phred33 -threads 8 \ -trimlog X.trimlog \ X_1.fastq.gz X_2.fastq.gz \ X_1.paired.fastq.gz X_2.unpaired.fastq.gz \ X_2.paired.fastq.gz X_2.unpaired.fastq.gz \ TRAILING:20 MINLEN:50 fastqc -f fastq -t 8 -o fastqc_after \ X_1.paired.fastq.gz X_2.paired.fastq.gz |
qline=`gzcat X_1.fastq.gz|head -4|tail -1` for i in `seq 1 ${#qline}`; do ascii=`printf '%d' \'${qline:$i-1:1}` qual=`expr ${ascii} - 33` printf '%.3f ' $((10**(-${qual}/10.0))) done |
url=ftp://gsapubftp-anonymous@ftp.broadinstitute.org/bundle/2.8/b37 for dl_file in {human_g1k_v37.fasta.gz,human_g1k_v37.fasta.fai.gz,\ human_g1k_v37.dict.gz,Broad.human.exome.b37.interval_list.gz,\ dbsnp_138.b37.vcf.gz,dbsnp_138.b37.vcf.idx.gz}; do curl -O ${url}/${dl_file} done |
#!/usr/bin/env sh bwa index -a b37/human_g1k_v37.fasta ulimit -n 3000 bwa mem -t 8 \ -R '@RG\tID:X\tSM:X\tPL:Illumina' \ b37/human_g1k_v37.fasta \ X_1.paired.fastq.gz X_2.paired.fastq.gz | \ samtools view -@ 8 -1 -S - > X_aligned.bam samtools sort -@ 8 X_aligned.bam X_aligned_sorted samtools index X_aligned_sorted.bam X_aligned_sorted.bai |
#!/usr/bin/env sh java -Xmx8g -jar GenomeAnalysisTK-3.6/\ GenomeAnalysisTK.jar \ -T HaplotypeCaller \ -R b37/human_g1k_v37.fasta \ -I X_aligned_sorted.bam \ --dbsnp b37/dbsnp_138.b37.vcf \ -L b37/Broad.human.exome.b37.interval_list \ -o X_variants.vcf |
bwa mem -t8 -M NC_001806.2.fasta X_unmapped.fastq | \ samtools view -@8 -1 -S -> X_unmapped_aligned.bam samtools sort -@8 X_unmapped_aligned.bam X_unmapped_aligned_sorted samtools index X_unmapped_aligned_sorted.bam X_unmapped_aligned_sorted.bai samtools idxstats X_unmapped_aligned_sorted.bam > X_unmapped_stat.txt |