diff --git a/CHANGELOG.md b/CHANGELOG.md index 37a0a7886cf4e927783ceafa9a8adb127691b2f0..0a2d45fe9c8d83de81d5859fd4836d3746170d73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## v1.3.0 - 2021-22-05 -* Change the /tmp/ folder by ./tmp/ folder so that all tmp files are now in the work (#24) +* Change the `/tmp/` folder to `./tmp/` folder so that all tmp files are now in the work directory (#24) * Add `--hicpro_maps` options to generate the raw and normalized HiC-Pro maps. The default is now to use cooler * Add chromosome compartments calling with cooltools (#53) * Add HiCExplorer distance decay quality control (#54) diff --git a/docs/usage.md b/docs/usage.md index f072ba565b84454879b8f1e9f83cf368f74ae24f..800d44713563554482d79b8e165d06514ad921e3 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -145,7 +145,7 @@ process { } ``` -To find the exact name of a process you wish to modify the compute resources, check the live-status of a nextflow run displayed on your terminal or check the nextflow error for a line like so: `Error executing process > 'bwa'`. In this case the name to specify in the custom config file is `bwa`. +To find the exact name of a process you wish to modify the compute resources, check the live-status of a nextflow run displayed on your terminal or check the nextflow error for a line like so: `Error executing process > 'bowtie2_end_to_end'`. In this case the name to specify in the custom config file is `bowtie2_end_to_end`. See the main [Nextflow documentation](https://www.nextflow.io/docs/latest/config.html) for more information. @@ -485,7 +485,7 @@ framework to build the raw and balanced contact maps in txt and (m)cool formats. ### `--bin_size` Resolution of contact maps to generate (comma separated). -Default:'1000000' +Default:'1000000,500000' ```bash --bins_size '[string]' @@ -592,7 +592,7 @@ Default: 'insulation' #### `--res_tads` Resolution to run the TADs calling analysis (comma separated). -Default: '40000' +Default: '40000,20000' ```bash --res_tads '[string]' diff --git a/main.nf b/main.nf index 963c260532e62d7fb63101ae6f355147fbf5f89d..a8611d564b4a7d9d029e0549976ceaa69afb93f4 100644 --- a/main.nf +++ b/main.nf @@ -121,9 +121,6 @@ if (params.split_fastq ){ // Reference genome if ( params.bwt2_index ){ - //lastPath = params.bwt2_index.lastIndexOf(File.separator) - //bwt2_dir = params.bwt2_index.substring(0,lastPath+1) - //bwt2_base = params.bwt2_index.substring(lastPath+1) Channel.fromPath( params.bwt2_index , checkIfExists: true) .ifEmpty { exit 1, "Genome index: Provided index not found: ${params.bwt2_index}" } @@ -131,10 +128,6 @@ if ( params.bwt2_index ){ } else if ( params.fasta ) { - //lastPath = params.fasta.lastIndexOf(File.separator) - //fasta_base = params.fasta.substring(lastPath+1) - //fasta_base = fasta_base.toString() - ~/(\.fa)?(\.fasta)?(\.fas)?(\.fsa)?$/ - Channel.fromPath( params.fasta ) .ifEmpty { exit 1, "Genome index: Fasta file not found: ${params.fasta}" } .into { fasta_for_index } @@ -551,9 +544,7 @@ if (!params.dnase){ set val(oname), file("${prefix}.mapstat") into all_mapstat script: - //sample = prefix.toString() - ~/(_R1|_R2|_val_1|_val_2|_1|_2)/ sample = prefix.toString() - ~/(_R1|_R2)/ - //tag = prefix.toString() =~/_R1|_val_1|_1/ ? "R1" : "R2" tag = prefix.toString() =~/_R1/ ? "R1" : "R2" oname = prefix.toString() - ~/(\.[0-9]+)$/ """ @@ -699,7 +690,7 @@ process remove_duplicates { mkdir -p stats/${sample} ## Sort valid pairs and remove read pairs with same starts (i.e duplicated read pairs) - sort -S 50% -k2,2V -k3,3n -k5,5V -k6,6n -m ${vpairs} | \ + sort -S 50% -k2,2V -k3,3n -k5,5V -k6,6n -m ${vpairs} | \\ awk -F"\\t" 'BEGIN{c1=0;c2=0;s1=0;s2=0}(c1!=\$2 || c2!=\$5 || s1!=\$3 || s2!=\$6){print;c1=\$2;c2=\$5;s1=\$3;s2=\$6}' > ${sample}.allValidPairs echo -n "valid_interaction\t" > ${sample}_allValidPairs.mergestat diff --git a/nextflow_schema.json b/nextflow_schema.json index a6bead5e83ec99ef88915b82b31d89abd7fba9ef..7fe34b7c68bcc906fbaa437aab40a53ae0d41bfc 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -227,7 +227,8 @@ "properties": { "bin_size": { "type": "string", - "default": "'1000000,500000'", + "pattern": "^(\\d+)(,\\d+)*$", + "default": "1000000,500000", "description": "Resolution to build the maps (comma separated)" }, "hicpro_maps": { @@ -268,6 +269,7 @@ "properties": { "res_dist_decay": { "type": "string", + "pattern": "^(\\d+)(,\\d+)*$", "default": "1000000", "description": "Resolution to build count/distance plot" }, @@ -278,11 +280,13 @@ }, "res_tads": { "type": "string", + "pattern": "^(\\d+)(,\\d+)*$", "default": "40000,20000", "description": "Resolution to run TADs callers (comma separated)" }, "res_compartments": { "type": "string", + "pattern": "^(\\d+)(,\\d+)*$", "default": "250000", "description": "Resolution for compartments calling" }