Skip to content

Commit 48c932d

Browse files
committed
[MODIF] HICPRO workflow is running
1 parent e25fd4d commit 48c932d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2009
-1305
lines changed

conf/igenomes.config

Lines changed: 157 additions & 427 deletions
Large diffs are not rendered by default.

conf/modules.config

Lines changed: 63 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,64 @@
1-
/*
2-
========================================================================================
3-
Config file for defining DSL2 per module options
4-
========================================================================================
5-
Available keys to override module options:
6-
args = Additional arguments appended to command in module.
7-
args2 = Second set of arguments appended to command in module (multi-tool modules).
8-
args3 = Third set of arguments appended to command in module (multi-tool modules).
9-
publish_dir = Directory to publish results.
10-
publish_by_meta = Groovy list of keys available in meta map to append as directories to "publish_dir" path
11-
If publish_by_meta = true - Value of ${meta['id']} is appended as a directory to "publish_dir" path
12-
If publish_by_meta = ['id', 'custompath'] - If "id" is in meta map and "custompath" isn't then "${meta['id']}/custompath/"
13-
is appended as a directory to "publish_dir" path
14-
If publish_by_meta = false / null - No directories are appended to "publish_dir" path
15-
publish_files = Groovy map where key = "file_ext" and value = "directory" to publish results for that file extension
16-
The value of "directory" is appended to the standard "publish_dir" path as defined above.
17-
If publish_files = null (unspecified) - All files are published.
18-
If publish_files = false - No files are published.
19-
suffix = File name suffix for output files.
20-
----------------------------------------------------------------------------------------
21-
*/
22-
23-
params {
24-
modules {
25-
'fastqc' {
26-
args = "--quiet"
27-
}
28-
'multiqc' {
29-
args = ""
30-
}
31-
}
1+
process {
2+
3+
//Default
4+
publishDir = [
5+
path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
6+
mode: 'copy',
7+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
8+
]
9+
10+
// PREPARE_GENOME
11+
withName: 'BOWTIE2_BUILD' {
12+
publishDir = [
13+
path: { "${params.outdir}/genome/bowtie2" },
14+
mode: 'copy',
15+
enabled: params.save_reference
16+
]
17+
}
18+
19+
withName: 'GET_CHROMSIZE' {
20+
publishDir = [
21+
path: { "${params.outdir}/genome" },
22+
mode: 'copy',
23+
enabled: params.save_reference
24+
]
25+
}
26+
27+
withName: 'GET_RESTRICTION_FRAGMENTS' {
28+
publishDir = [
29+
path: { "${params.outdir}/genome" },
30+
mode: 'copy',
31+
enabled: params.save_reference
32+
]
33+
}
34+
35+
// HICPRO
36+
withName:'BOWTIE2_ALIGN' {
37+
ext.prefix = { "${meta.id}_${meta.mates}" }
38+
ext.args = params.bwt2_opts_end2end ?: ''
39+
}
40+
41+
withName:'BOWTIE2_ALIGN_TRIMMED' {
42+
ext.prefix = { "${meta.id}_${meta.mates}_trimmed" }
43+
ext.args = params.bwt2_opts_trimmed ?: ''
44+
}
45+
46+
withName: 'COMBINE_MATES' {
47+
ext.args = [
48+
"-t",
49+
params.keep_multi ? "--multi" : "",
50+
params.min_mapq ? "-q ${params.min_mapq}" : ""
51+
].join(' ').trim()
52+
}
53+
54+
withName: 'GET_VALID_INTERACTION' {
55+
ext.args = [
56+
params.min_cis_dist > 0 ? " -d ${params.min_cis_dist}" : '',
57+
params.min_insert_size > 0 ? " -s ${params.min_insert_size}" : '',
58+
params.max_insert_size > 0 ? " -l ${params.max_insert_size}" : '',
59+
params.min_restriction_fragment_size > 0 ? " -t ${params.min_restriction_fragment_size}" : '',
60+
params.max_restriction_fragment_size > 0 ? " -m ${params.max_restriction_fragment_size}" : '',
61+
params.save_interaction_bam ? " --sam" : ''
62+
].join(' ').trim()
63+
}
3264
}

conf/test.config

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,42 @@
11
/*
2-
========================================================================================
3-
Nextflow config file for running minimal tests
4-
========================================================================================
5-
Defines input files and everything required to run a fast and simple pipeline test.
6-
7-
Use as follows:
8-
nextflow run nf-core/hic -profile test,<docker/singularity>
9-
10-
----------------------------------------------------------------------------------------
11-
*/
2+
* -------------------------------------------------
3+
* Nextflow config file for running tests
4+
* -------------------------------------------------
5+
* Defines bundled input files and everything required
6+
* to run a fast and simple test. Use as follows:
7+
* nextflow run nf-core/hic -profile test,<docker/singularity>
8+
*/
129

1310
params {
14-
config_profile_name = 'Test profile'
15-
config_profile_description = 'Minimal test dataset to check pipeline function'
11+
config_profile_name = 'Hi-C test data from Schalbetter et al. (2017)'
12+
config_profile_description = 'Minimal test dataset to check pipeline function'
13+
14+
// Limit resources so that this can run on Travis
15+
max_cpus = 2
16+
max_memory = 4.GB
17+
max_time = 1.h
1618

17-
// Limit resources so that this can run on GitHub Actions
18-
max_cpus = 2
19-
max_memory = 6.GB
20-
max_time = 6.h
19+
// Input data
20+
//input_paths = [
21+
// ['SRR4292758_00', ['https://github.com/nf-core/test-datasets/raw/hic/data/SRR4292758_00_R1.fastq.gz', 'https://github.com/nf-core/test-datasets/raw/hic/data/SRR4292758_00_R2.fastq.gz']]
22+
// ]
23+
input = '/home/nservant/tmp/nf-core-hic/samplesheet.csv'
2124

22-
// Input data
23-
// TODO nf-core: Specify the paths to your test data on nf-core/test-datasets
24-
// TODO nf-core: Give any required params for the test so that command line flags are not needed
25-
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv'
25+
// Annotations
26+
fasta = 'https://github.com/nf-core/test-datasets/raw/hic/reference/W303_SGD_2015_JRIU00000000.fsa'
27+
digestion = 'hindiii'
28+
min_mapq = 10
29+
min_restriction_fragment_size = 100
30+
max_restriction_fragment_size = 100000
31+
min_insert_size = 100
32+
max_insert_size = 600
2633

27-
// Genome references
28-
genome = 'R64-1-1'
34+
bin_size = '1000'
35+
res_dist_decay = '1000'
36+
res_tads = '1000'
37+
tads_caller = 'insulation,hicexplorer'
38+
res_compartments = '1000'
39+
40+
// Ignore `--input` as otherwise the parameter validation will throw an error
41+
schema_ignore_params = 'genomes,digest,input_paths,input'
2942
}

lib/WorkflowHic.groovy

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,18 @@ class WorkflowHic {
1010
public static void initialise(params, log) {
1111
genomeExistsError(params, log)
1212

13-
if (!params.fasta) {
14-
log.error "Genome fasta file not specified with e.g. '--fasta genome.fa' or via a detectable config file."
15-
System.exit(1)
13+
// digestion parameters
14+
if (params.digest && params.digestion && !params.digest.containsKey(params.digestion)) {
15+
log.error "Unknown digestion protocol. Currently, the available digestion options are ${params.digest.keySet().join(", ")}. Please set manually the '--restriction_site' and '--ligation_site' parameters."
16+
System.exit(1)
1617
}
18+
19+
// Check Digestion or DNase Hi-C mode
20+
//if (!params.dnase && !params.ligation_site) {
21+
// log.error "Ligation motif not found. Please either use the `--digestion` parameters or specify the `--restriction_site` and `--ligation_site`. For DNase Hi-C, please use '--dnase' option"
22+
// System.exit(1)
23+
//}
24+
1725
}
1826

1927
//

main.nf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ nextflow.enable.dsl = 2
1818
*/
1919

2020
params.fasta = WorkflowMain.getGenomeAttribute(params, 'fasta')
21+
params.bwt2_index = WorkflowMain.getGenomeAttribute(params, 'bowtie2')
2122

2223
/*
2324
========================================================================================

modules.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,24 @@
33
"homePage": "https://github.com/nf-core/hic",
44
"repos": {
55
"nf-core/modules": {
6+
"bowtie2/align": {
7+
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
8+
},
9+
"bowtie2/build": {
10+
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
11+
},
612
"fastqc": {
7-
"git_sha": "e937c7950af70930d1f34bb961403d9d2aa81c7d"
13+
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
814
},
915
"multiqc": {
10-
"git_sha": "e937c7950af70930d1f34bb961403d9d2aa81c7d"
16+
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
17+
},
18+
"samtools/merge": {
19+
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
20+
},
21+
"samtools/sort": {
22+
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
1123
}
1224
}
1325
}
14-
}
26+
}

modules/local/bowtie2_merge_mapping_steps.nf

Lines changed: 0 additions & 47 deletions
This file was deleted.

modules/local/build_contact_maps.nf

Lines changed: 0 additions & 26 deletions
This file was deleted.

modules/local/combine_mates.nf

Lines changed: 0 additions & 36 deletions
This file was deleted.

modules/local/converts_to_pairs.nf

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)