samtools index -@ ${threadCount}${matureSamMerge}/unique.sorted.merged.bam || die "cannot index the unique bam "
fi
# remove duplicates from sorted, merged bam
...
...
@@ -209,6 +255,8 @@ else # proceed to split the bam
samtools rmdup -S${matureSamMerge}/sorted.merged.bam ${matureSamMerge}/unique.sorted.merged.bam || die "cannot remove duplicates"
fi
nsec "done"
# index the unique bam
vsec "indexing sunique alignments"
...
...
@@ -225,10 +273,10 @@ vsec "bam is "${matureSamMerge}/unique.sorted.merged.bam""
vsec "annotation is ${myAnnotation}"
# ask whippet to make an index while recognizing splice junctions from our bam
wptIdx="/g/data/lf10/as7425/SRscan/index-whippet";mkdir${wptIdx} 2>/dev/null;cd${wptIdx}|| die "cannot access whippet index directory";rm-rf${wptIdx}/*
wptIdx="/g/data/lf10/as7425/SRscan/index-whippet";mkdir-p${wptIdx} 2>/dev/null;cd${wptIdx}|| die "cannot access whippet index directory";rm-rf${wptIdx}/*
julia ${whippetPath}/whippet-index.jl --fasta"${myFasta}"--bam"${matureSamMerge}/unique.sorted.merged.bam"--gtf"${myAnnotation}"--bam-min-reads 3 --index${wptIdx}|| die "canot make whippet index"
exit 0
####################################
# generate OTF fastq for each cytoplasmic alignment
scaffoldCount=$(cat${genomeDir}/scaffolds.txt | wc-l);[${scaffoldCount}-gt"0"]|| die "did not find any scaffolds in your annotation"; ssec "found ${scaffoldCount} scaffolds in your annotation"
scaffoldCount=$(cat${genomeDir}/scaffolds.txt | wc-l);[${scaffoldCount}-gt"0"]|| die "did not find any scaffolds in your annotation"
ssec "found ${scaffoldCount} scaffolds in your annotation"
cp${myAnnotation}${genomeDir}|| die "cannot backup your annotation"