Skip to content
Snippets Groups Projects
Commit cacd8bc8 authored by Brandi Cantarel's avatar Brandi Cantarel
Browse files

cvc simplify dnaworkflows

parent 2f706943
Branches
Tags
No related merge requests found
../alignment/add_umi_sam.py
\ No newline at end of file
......@@ -26,11 +26,20 @@ done
shift $(($OPTIND -1))
baseDir="`dirname \"$0\"`"
fqs=("$@")
fqs=''
i=0
numfq=$#
while [[ $i -le $numfq ]]
do
fqs="$fqs $1"
i=$((i + 1))
shift 1
done
# Check for mandatory options
if [[ -z $pair_id ]] || [[ -z $fq1 ]]; then
if [[ -z $pair_id ]]
then
usage
fi
NPROC=$SLURM_CPUS_ON_NODE
......@@ -50,17 +59,18 @@ else
fi
source /etc/profile.d/modules.sh
module load trimgalore/0.6.4 cutadapt/1.9.1 python/2.7.x-anaconda bwakit/0.7.15 samtools/gcc/1.8 picard/2.10.3
module load trimgalore/0.6.4 cutadapt/1.9.1 bwakit/0.7.15 samtools/gcc/1.8 picard/2.10.3
threads=`expr $NPROC / 2`
trim_galore --cores $threads --paired -q 25 -o trim --illumina --gzip --length 35 ${fqs}
if [[ $filter == 1 ]]
trim_galore --cores 4 --paired -q 25 --illumina --gzip --length 35 ${fqs}
if [[ ${filter} == 1 ]]
then
perl $baseDir/parse_trimreport.pl ${pair_id}.trimreport.txt *trimming_report.txt
fi
bwa mem -M -t $threads -R "@RG\tID:${read_group}\tLB:tx\tPL:illumina\tPU:barcode\tSM:${read_group}" ${index_path}/genome.fa trim/*.fq.gz > out.sam
bwa mem -M -t $threads -R "@RG\tID:${read_group}\tLB:tx\tPL:illumina\tPU:barcode\tSM:${read_group}" ${index_path}/genome.fa *.fq.gz > out.sam
if [[ $umi == 'umi' ]] && [[ -f "${index_path}/genome.fa.alt" ]]
then
......
../preproc_fastq/parse_trimreport.pl
\ No newline at end of file
......@@ -92,10 +92,15 @@ source /etc/profile.d/modules.sh
module load htslib/gcc/1.8
if [ $algo == 'strelka2' ]
then
module load strelka/2.9.10 manta/1.3.1 samtools/gcc/1.8 snpeff/4.3q vcftools/0.1.14
mkdir manta strelka
configManta.py --normalBam ${normal} --tumorBam ${tumor} --referenceFasta ${reffa} --runDir manta
then
opt=''
if [[ -n $tbed ]]
then
opt="--callRegions ${tbed}.gz}"
module load strelka/2.9.10 manta/1.3.1 samtools/gcc/1.8 snpeff/4.3q vcftools/0.1.14
fi
mkdir manta
configManta.py --normalBam ${normal} --tumorBam ${tumor} --referenceFasta ${reffa} $opt --runDir manta
manta/runWorkflow.py -m local -j 8
if [[ -f manta/results/variants/candidateSmallIndels.vcf.gz ]]
then
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment