Skip to content

Commit

Permalink
v0.1.0, switch to pairtools, update cooler
Browse files Browse the repository at this point in the history
  • Loading branch information
golobor committed Aug 4, 2018
1 parent 39ac94b commit 963776c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### 0.1.0 (2018-08-04) ###

* Distiller-env: switch to pairtools v0.2.0 and cooler v0.7.10.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version='0.0.11'
version='0.1.0'
26 changes: 13 additions & 13 deletions distiller.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -392,15 +392,15 @@ 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}
"""
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
"""

Expand Down Expand Up @@ -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
"""
}
Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
) \
Expand Down Expand Up @@ -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
"""
}

Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies:
- dask
- nose
- pairix
- pairtools
- pip:
- cooler>=0.7.1
- git+https://github.com/mirnylab/pairsamtools
- toolz

0 comments on commit 963776c

Please sign in to comment.