# Trim bases and adapters using skewer skewer -t 12 -Q 20 -q 3 sample1.read1.fastq.gz sample1.read.2.fastq.qz -o sample1 # Parameters used: # -- 3' end adapter sequence (-x): AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC # -- paired 3' end adapter sequence (-y): AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTA # -- maximum error ratio allowed (-r): 0.100 # -- maximum indel error ratio allowed (-d): 0.030 # -- mean quality threshold (-Q): 20 # -- end quality threshold (-q): 3 # -- minimum read length allowed after trimming (-l): 18 # Align to genome using HiSAT2 hisat2-build --verbose genome.name genome.name hisat2 -x genome.name -p threads -1 sample1.trimmed_R1 -2 sample1.trimmed_R2 -S sample1.sam samtools view -bS sample1.sam samtools sort -o sample1.bam system index sample1.bam samtools # Run Opposum to clean alignment from hiSat python ./Opossum-master/Opossum.py --BamFile=sample1.bam --OutFile=sample1.opossum.bam # Call SNPs and FST samtools mpileup -f 002099425_GCF.1_phaCin_unsw_v4.1_genomic.fna -u -g -b ALL.sample.IDs.txt > combined.rawcalls.bcf # sample.IDs.txt is a file containing a list of all bam file names to process. bcftools call -vm combined.rawcalls.bcf > combined.rawcalls.vcf vcftools --vcf combined.rawcalls.vcf --max-missing 0.5 --maf 0.2 --minQ 30 --recode --recode-INFO-all --out combined.filteredcalls # rename combined.filteredcalls.recode.vcf as combined.filteredcalls.vcf vcftools --vcf combined.filteredcalls.vcf --weir-fst-pop QLD.sample.IDs.txt --weir-fst-pop SA.sample.IDs.txt --out combined.filteredcalls # QLD.sample.IDs.txt = list of sample names from Queensland # SA.sample.IDs.txt = list of sample names from South Australia