From 57c29fb73b7f95414f1161dba0fa20a08d310a95 Mon Sep 17 00:00:00 2001 From: Stephen Newhouse Date: Tue, 8 Sep 2015 13:14:25 +0100 Subject: [PATCH 1/4] dev updates Tue 8 Sep 2015 13:14:25 BST --- bin/ngseasy_trimmomatic | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/bin/ngseasy_trimmomatic b/bin/ngseasy_trimmomatic index b207573..71f7986 100755 --- a/bin/ngseasy_trimmomatic +++ b/bin/ngseasy_trimmomatic @@ -409,7 +409,17 @@ fi ######################################################################################################## # adapter_fa : check of this is in palce and exit if not ######################################################################################################## -adapter_fa="/home/pipeman/ngs_projects/ngseasy_resources/reference_genomes_b37/contaminant_list.fa" + +if [[ ${GENOMEBUILD} == "b37" ]]; then + adapter_fa="/home/pipeman/ngs_projects/ngseasy_resources/reference_genomes_b37/contaminant_list.fa" +elif [[ ${GENOMEBUILD} == "hg19" ]]; then + adapter_fa="/home/pipeman/ngs_projects/ngseasy_resources/reference_genomes_hg19/contaminant_list.fa" +elif [[ "${GENOMEBUILD}" == "hs37d5" ]]; then + adapter_fa="/home/pipeman/ngs_projects/ngseasy_resources/reference_genomes_hs37d5/contaminant_list.fa" +elif [[ "${GENOMEBUILD}" == "hs38DH" ]]; then + adapter_fa="/home/pipeman/ngs_projects/ngseasy_resources/reference_genomes_hs38DH/contaminant_list.fa" +fi + logger_ngseasy "[${NGSEASY_STEP}]:setting adaptor list docker dir [$adapter_fa]" ${LOGFILE} ######################################################################################################## @@ -464,8 +474,8 @@ logger_ngseasy "[${NGSEASY_STEP}]:START qc of raw fastq files" ${LOGFILE} logger_ngseasy "[${NGSEASY_STEP}]:TRIM set to [$TRIM] - adaptor trim. Adaptor and read quality trimming" ${LOGFILE} ## get ngs_resource mapping -myresources=`dirname ${PROJECT_DIR}` -NGSResources="${myresources}/ngs_resources" +##myresources=`dirname ${PROJECT_DIR}` +##NGSResources="${myresources}/ngseasy_resources" ## run trimmomatic # From eb2c7b8e6a9226cbd82553cdad17a60aed831d11 Mon Sep 17 00:00:00 2001 From: Stephen Newhouse Date: Tue, 8 Sep 2015 13:17:36 +0100 Subject: [PATCH 2/4] dev updates Tue 8 Sep 2015 13:17:36 BST --- bin/ngseasy_trimmomatic | 41 ++++++++++------------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/bin/ngseasy_trimmomatic b/bin/ngseasy_trimmomatic index 71f7986..b3cfd4a 100755 --- a/bin/ngseasy_trimmomatic +++ b/bin/ngseasy_trimmomatic @@ -409,7 +409,6 @@ fi ######################################################################################################## # adapter_fa : check of this is in palce and exit if not ######################################################################################################## - if [[ ${GENOMEBUILD} == "b37" ]]; then adapter_fa="/home/pipeman/ngs_projects/ngseasy_resources/reference_genomes_b37/contaminant_list.fa" elif [[ ${GENOMEBUILD} == "hg19" ]]; then @@ -419,7 +418,6 @@ elif [[ "${GENOMEBUILD}" == "hs37d5" ]]; then elif [[ "${GENOMEBUILD}" == "hs38DH" ]]; then adapter_fa="/home/pipeman/ngs_projects/ngseasy_resources/reference_genomes_hs38DH/contaminant_list.fa" fi - logger_ngseasy "[${NGSEASY_STEP}]:setting adaptor list docker dir [$adapter_fa]" ${LOGFILE} ######################################################################################################## @@ -464,19 +462,17 @@ if [ -s "${SOUT}/fastq/${SAMPLE_ID}.${NGS_TYPE}.${DNA_PREP_LIBRARY_ID}.${TRIM}_1 then logger_ngseasy "[${NGSEASY_STEP}]:PE Trimmed Data already exists...skipping [${NGSEASY_STEP}]" ${LOGFILE} +######################################################################################################## +## atrim elif [[ "$TRIM" == "atrim" ]]; then logger_ngseasy "[${NGSEASY_STEP}]:Trimmomatic not run yet" ${LOGFILE} ######################################################################################################## ## run compbio/ngseasy-trimmomatic -# +######################################################################################################## logger_ngseasy "[${NGSEASY_STEP}]:START qc of raw fastq files" ${LOGFILE} logger_ngseasy "[${NGSEASY_STEP}]:TRIM set to [$TRIM] - adaptor trim. Adaptor and read quality trimming" ${LOGFILE} -## get ngs_resource mapping -##myresources=`dirname ${PROJECT_DIR}` -##NGSResources="${myresources}/ngseasy_resources" - ## run trimmomatic # logger_ngseasy "[${NGSEASY_STEP}]:[cmd]: ILLUMINACLIP:${adapter_fa}:2:30:10:5:true LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 AVGQUAL:2 MINLEN:75 " ${LOGFILE} @@ -502,8 +498,9 @@ logger_ngseasy "[${NGSEASY_STEP}]:[cmd]: ILLUMINACLIP:${adapter_fa}:2:30:10:5:tr logger_ngseasy "[${NGSEASY_STEP}]:FastQC post Trimmomatic" ${LOGFILE} +######################################################################################################## ## compbio/ngseasy-fastqc -# +######################################################################################################## ${DOCKER_RUN} \ --rm=true \ -v ${PROJECT_DIR}:/home/pipeman/ngs_projects \ @@ -522,34 +519,15 @@ logger_ngseasy "[${NGSEASY_STEP}]:FastQC post Trimmomatic" ${LOGFILE} ######################################################################################################## ## Just QC FASTQ NO ADAPTOR TRIM # btrim is basic qc-trim -# +######################################################################################################## elif [[ "$TRIM" == "btrim" ]]; then logger_ngseasy "[${NGSEASY_STEP}]:START qc of raw fastq files" ${LOGFILE} logger_ngseasy "[${NGSEASY_STEP}]:TRIM set to [$TRIM] - basic trim. Just read quality trimming. No adaptor trimming" ${LOGFILE} -#if [[ ! -s ${SOUT}/fastq/${FQ1}.art_filt.gz ]] && [[ ! -s ${SOUT}/fastq/${FQ2}.art_filt.gz ]]; then -## make parallel cmd -# -#echo -e " -#zcat ${SOUTDocker}/fastq/${FQ1} | fastx_artifacts_filter -Q33 -i - -z -o ${SOUTDocker}/fastq/${FQ1}.art_filt.gz -#zcat ${SOUTDocker}/fastq/${FQ2} | fastx_artifacts_filter -Q33 -i - -z -o ${SOUTDocker}/fastq/${FQ2}.art_filt.gz -#" > ${SOUT}/parallel_fastx.cmd -# -## run fastx_artifacts_filter -# -#logger_ngseasy "[${NGSEASY_STEP}]:[cmd]: fastx_artifacts_filter. Removing Homopolymer reads" ${LOGFILE} -# -# ${DOCKER_RUN} \ -# --rm=true \ -# -v ${PROJECT_DIR}:/home/pipeman/ngs_projects \ -# --name fastx_artifacts_filter_${BAM_PREFIX} \ -# -t compbio/ngseasy-trimmomatic:${NGSEASYVERSION} /bin/bash -c "cat ${SOUTDocker}/parallel_fastx.cmd | parallel -j 2 --no-notice" -#fi - - +######################################################################################################## ## run trimmomatic -# +######################################################################################################## ${DOCKER_RUN} \ --rm=true \ -v ${PROJECT_DIR}:/home/pipeman/ngs_projects \ @@ -569,8 +547,9 @@ logger_ngseasy "[${NGSEASY_STEP}]:TRIM set to [$TRIM] - basic trim. Just read qu logger_ngseasy "[${NGSEASY_STEP}]:START FastQC post Trimmomatic" ${LOGFILE} +######################################################################################################## ## compbio/ngseasy-fastqc -# +######################################################################################################## ${DOCKER_RUN} \ --rm=true \ -v ${PROJECT_DIR}:/home/pipeman/ngs_projects \ From 24c6d2c40bf0f629fb0f574ecc3f2cdd2f7ea798 Mon Sep 17 00:00:00 2001 From: Stephen Newhouse Date: Tue, 8 Sep 2015 13:20:11 +0100 Subject: [PATCH 3/4] dev updates Tue 8 Sep 2015 13:20:11 BST --- bin/ngseasy_trimmomatic | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/bin/ngseasy_trimmomatic b/bin/ngseasy_trimmomatic index b3cfd4a..f9df4ac 100755 --- a/bin/ngseasy_trimmomatic +++ b/bin/ngseasy_trimmomatic @@ -477,24 +477,23 @@ logger_ngseasy "[${NGSEASY_STEP}]:TRIM set to [$TRIM] - adaptor trim. Adaptor an # logger_ngseasy "[${NGSEASY_STEP}]:[cmd]: ILLUMINACLIP:${adapter_fa}:2:30:10:5:true LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 AVGQUAL:2 MINLEN:75 " ${LOGFILE} - ${DOCKER_RUN} \ - --rm=true \ - -v ${PROJECT_DIR}:/home/pipeman/ngs_projects \ - -v ${NGSResources}:/home/pipeman/ngs_resources \ - --name trimmomatic_${BAM_PREFIX} \ - -t compbio/ngseasy-trimmomatic:${NGSEASYVERSION} java -XX:ParallelGCThreads=1 -jar /usr/local/pipeline/Trimmomatic-0.32/trimmomatic-0.32.jar \ - PE \ - -threads ${NCPU} \ - ${SOUTDocker}/fastq/${FQ1} \ - ${SOUTDocker}/fastq/${FQ2} \ - ${qcPEFQ1} ${qcSEFQ1} \ - ${qcPEFQ2} ${qcSEFQ2} \ - ILLUMINACLIP:${adapter_fa}:2:30:10:5:true \ - LEADING:3 \ - TRAILING:3 \ - SLIDINGWINDOW:4:15 \ - AVGQUAL:2 \ - MINLEN:75 +${DOCKER_RUN} \ + --rm=true \ + -v ${PROJECT_DIR}:/home/pipeman/ngs_projects \ + --name trimmomatic_${BAM_PREFIX} \ + -t compbio/ngseasy-trimmomatic:${NGSEASYVERSION} java -XX:ParallelGCThreads=1 -jar /usr/local/pipeline/Trimmomatic-0.32/trimmomatic-0.32.jar \ + PE \ + -threads ${NCPU} \ + ${SOUTDocker}/fastq/${FQ1} \ + ${SOUTDocker}/fastq/${FQ2} \ + ${qcPEFQ1} ${qcSEFQ1} \ + ${qcPEFQ2} ${qcSEFQ2} \ + ILLUMINACLIP:${adapter_fa}:2:30:10:5:true \ + LEADING:3 \ + TRAILING:3 \ + SLIDINGWINDOW:4:15 \ + AVGQUAL:2 \ + MINLEN:75 logger_ngseasy "[${NGSEASY_STEP}]:FastQC post Trimmomatic" ${LOGFILE} From 2c4a68fc4be506aa853c21bf68bbc2903cef4977 Mon Sep 17 00:00:00 2001 From: Stephen Newhouse Date: Tue, 8 Sep 2015 13:20:58 +0100 Subject: [PATCH 4/4] dev updates Tue 8 Sep 2015 13:20:58 BST --- bin/ngseasy_trimmomatic | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/ngseasy_trimmomatic b/bin/ngseasy_trimmomatic index f9df4ac..3503442 100755 --- a/bin/ngseasy_trimmomatic +++ b/bin/ngseasy_trimmomatic @@ -472,9 +472,6 @@ elif [[ "$TRIM" == "atrim" ]]; then ######################################################################################################## logger_ngseasy "[${NGSEASY_STEP}]:START qc of raw fastq files" ${LOGFILE} logger_ngseasy "[${NGSEASY_STEP}]:TRIM set to [$TRIM] - adaptor trim. Adaptor and read quality trimming" ${LOGFILE} - -## run trimmomatic -# logger_ngseasy "[${NGSEASY_STEP}]:[cmd]: ILLUMINACLIP:${adapter_fa}:2:30:10:5:true LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 AVGQUAL:2 MINLEN:75 " ${LOGFILE} ${DOCKER_RUN} \ @@ -517,7 +514,7 @@ logger_ngseasy "[${NGSEASY_STEP}]:FastQC post Trimmomatic" ${LOGFILE} ######################################################################################################## ## Just QC FASTQ NO ADAPTOR TRIM -# btrim is basic qc-trim +## btrim is basic qc-trim ######################################################################################################## elif [[ "$TRIM" == "btrim" ]]; then @@ -525,7 +522,7 @@ logger_ngseasy "[${NGSEASY_STEP}]:START qc of raw fastq files" ${LOGFILE} logger_ngseasy "[${NGSEASY_STEP}]:TRIM set to [$TRIM] - basic trim. Just read quality trimming. No adaptor trimming" ${LOGFILE} ######################################################################################################## -## run trimmomatic +## run trimmomatic btrim ######################################################################################################## ${DOCKER_RUN} \ --rm=true \