### Supplementary Data 8: DNA coverage estimation ### #! /bin/bash #-# DNA coverage estimation. #-# Prog required: soap.coverage2.7.7 ########################### # Define global variables # ########################### thread=5 #number of threads spe=Ndegeerella #species name lib=(37850 37851 37852 37853) #libraries to assemble kmer=63 #k-mer size assf=AssemblyOutputs #denovo assembly folder mapf=MappingOutputs #mapping folder covf=CovOutputs #coverage folder ######### # Start # ######### for (( i = 0; i < ${#lib[@]}; i++ )) do #-1-# Get only uniquely mapped reads for each library grep -vw "XS:i" ${mapf}/${spe}_${kmer}.final.soap.sspace.cap_${lib[i]}.sam > ${mapf}/${spe}_${kmer}.final.soap.sspace.cap_${lib[i]}_unique.sam #-2-# Compute the DNA coverage with soap coverage for each library ~/bin/soap.coverage2.7.7/soap.coverage -sam -cvg -i ${mapf}/${spe}_${kmer}.final.soap.sspace.cap_${lib[i]}_unique.sam -onlyuniq -p ${thread} -refsingle ${assf}/${spe}_${kmer}.final.soap.sspace.cap.fasta -o ${covf}/${spe}_${kmer}.final.soap.sspace.cap_${lib[i]}_unique.soapcov done ####### # End # #######