From 963776cf8197acd091e4600ffbb9bfe41b87730b Mon Sep 17 00:00:00 2001 From: golobor Date: Sat, 4 Aug 2018 15:16:31 -0400 Subject: [PATCH] v0.1.0, switch to pairtools, update cooler --- CHANGES.md | 3 +++ VERSION | 2 +- distiller.nf | 26 +++++++++++++------------- docker/Dockerfile | 1 + environment.yml | 2 +- 5 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 CHANGES.md diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..3b3c9d3 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,3 @@ +### 0.1.0 (2018-08-04) ### + +* Distiller-env: switch to pairtools v0.2.0 and cooler v0.7.10. diff --git a/VERSION b/VERSION index 78a09a8..72290f6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -version='0.0.11' +version='0.1.0' diff --git a/distiller.nf b/distiller.nf index 4e68571..cedad23 100644 --- a/distiller.nf +++ b/distiller.nf @@ -358,11 +358,11 @@ process parse_chunks { """ mkdir ./tmp4sort - pairsamtools parse ${dropsam_flag} ${dropreadid_flag} ${dropseq_flag} \ + pairtools parse ${dropsam_flag} ${dropreadid_flag} ${dropseq_flag} \ -c ${chrom_sizes} ${bam} \ - | pairsamtools sort --nproc ${task.cpus} \ - -o ${library}.${run}.${chunk}.pairsam.${suffix} \ - --tmpdir ./tmp4sort \ + | pairtools sort --nproc ${task.cpus} \ + -o ${library}.${run}.${chunk}.pairsam.${suffix} \ + --tmpdir ./tmp4sort \ | cat @@ -392,7 +392,7 @@ process merge_chunks_into_runs { set library, run, "${library}.${run}.pairsam.${suffix}" into LIB_RUN_PAIRSAMS script: - // can we replace this part with just the "else" branch, so that pairsamtools merge will take care of it? + // can we replace this part with just the "else" branch, so that pairtools merge will take care of it? if( isSingleFile(pairsam_chunks) ) """ ln -s \"\$(readlink -f ${pairsam_chunks})\" ${library}.${run}.pairsam.${suffix} @@ -400,7 +400,7 @@ process merge_chunks_into_runs { else """ mkdir ./tmp4sort - pairsamtools merge ${pairsam_chunks} --nproc ${task.cpus} -o ${library}.${run}.pairsam.${suffix} --tmpdir ./tmp4sort + pairtools merge ${pairsam_chunks} --nproc ${task.cpus} -o ${library}.${run}.pairsam.${suffix} --tmpdir ./tmp4sort rm -rf ./tmp4sort """ @@ -434,7 +434,7 @@ process merge_runs_into_libraries { else """ mkdir ./tmp4sort - pairsamtools merge ${run_pairsam} --nproc ${task.cpus} -o ${library}.pairsam.${suffix} --tmpdir ./tmp4sort + pairtools merge ${run_pairsam} --nproc ${task.cpus} -o ${library}.pairsam.${suffix} --tmpdir ./tmp4sort rm -rf ./tmp4sort """ } @@ -484,7 +484,7 @@ process filter_make_pairs { dropsam = params['map'].get('drop_sam','false').toBoolean() if(dropsam) """ - pairsamtools dedup \ + pairtools dedup \ --max-mismatch ${params.filter.pcr_dups_max_mismatch_bp} \ --mark-dups \ --output ${library}.nodups.pairs.gz \ @@ -501,21 +501,21 @@ process filter_make_pairs { """ else """ - pairsamtools dedup \ + pairtools dedup \ --max-mismatch ${params.filter.pcr_dups_max_mismatch_bp} \ --mark-dups \ --output \ - >( pairsamtools split \ + >( pairtools split \ --output-pairs ${library}.nodups.pairs.gz \ --output-sam ${library}.nodups.bam \ ) \ --output-unmapped \ - >( pairsamtools split \ + >( pairtools split \ --output-pairs ${library}.unmapped.pairs.gz \ --output-sam ${library}.unmapped.bam \ ) \ --output-dups \ - >( pairsamtools split \ + >( pairtools split \ --output-pairs ${library}.dups.pairs.gz \ --output-sam ${library}.dups.bam \ ) \ @@ -764,7 +764,7 @@ process merge_stats_libraries_into_groups { """ else """ - pairsamtools stats --merge ${stats} -o ${library_group}.stats + pairtools stats --merge ${stats} -o ${library_group}.stats """ } diff --git a/docker/Dockerfile b/docker/Dockerfile index 9e10a7c..56d4fbe 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,6 +20,7 @@ ENV PATH=/miniconda3/bin:${PATH} # Install conda dependencies ADD environment.yml / +ADD VERSION / RUN pwd RUN conda config --set always_yes yes --set changeps1 no && \ conda config --add channels conda-forge && \ diff --git a/environment.yml b/environment.yml index 52a5bca..667fa07 100644 --- a/environment.yml +++ b/environment.yml @@ -21,7 +21,7 @@ dependencies: - dask - nose - pairix + - pairtools - pip: - cooler>=0.7.1 - - git+https://github.com/mirnylab/pairsamtools - toolz