Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes test data #12

Merged
merged 18 commits into from
Nov 23, 2023
3 changes: 3 additions & 0 deletions conf/cloud-region/ap_southeast_1.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
params {
reference_data_bucket = "s3://ap-southeast-1-lb-featured-datasets"
}
8 changes: 4 additions & 4 deletions conf/tests/full/test_full.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
params {
input = "${params.reference_data_bucket}/pipelines/parabricks/germline/output/HG001-NA12878-pFDA_S1_L001_20k.vcf"
// input = 'https://lifebit-featured-datasets.s3-eu-west-1.amazonaws.com/pipelines/parabricks/germline/output/HG001-NA12878-pFDA_S1_L001_20k.vcf'
sample_name = 'HG001_NA12878'
// input = "https://lifebit-featured-datasets.s3-eu-west-1.amazonaws.com/pipelines/parabricks/germline/output/HG001-NA12878-pFDA_S1_L001_20k.vcf"
sample_name = "HG001_NA12878"
hpo_terms_file = "${params.reference_data_bucket}/pipelines/exomiser-nf/hpo_terms_file.txt"
prioritisers = 'hiPhivePrioritiser'
exomiser_profile_files = 'full'
prioritisers = "hiPhivePrioritiser"
exomiser_profile_files = "full"
application_properties = "${params.reference_data_bucket}/pipelines/exomiser-nf/application.properties"
}
10 changes: 5 additions & 5 deletions conf/tests/full/test_full_family.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
params {
families_file = 's3://lifebit-featured-datasets/pipelines/exomiser-nf/fam_file.tsv'
prioritisers = 'hiPhivePrioritiser'
exomiser_profile_files = 'full'
application_properties = 's3://lifebit-featured-datasets/pipelines/exomiser-nf/application.properties'
auto_config_yml = 's3://lifebit-featured-datasets/pipelines/exomiser-nf/auto_config.yml'
families_file = "${params.reference_data_bucket}/pipelines/exomiser-nf/fam_file.tsv"
prioritisers = "hiPhivePrioritiser"
exomiser_profile_files = "full"
application_properties = "${params.reference_data_bucket}/pipelines/exomiser-nf/application.properties"
auto_config_yml = "${params.reference_data_bucket}/pipelines/exomiser-nf/auto_config.yml"
}
10 changes: 5 additions & 5 deletions conf/tests/full/test_full_multi_hpo.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
params {
families_file = 's3://lifebit-featured-datasets/pipelines/exomiser-nf/fam_file_multi_hpo.tsv'
prioritisers = 'hiPhivePrioritiser'
exomiser_profile_files = 'full'
application_properties = 's3://lifebit-featured-datasets/pipelines/exomiser-nf/application.properties'
auto_config_yml = 's3://lifebit-featured-datasets/pipelines/exomiser-nf/auto_config.yml'
families_file = "${params.reference_data_bucket}/pipelines/exomiser-nf/fam_file_multi_hpo.tsv"
prioritisers = "hiPhivePrioritiser"
exomiser_profile_files = "full"
application_properties = "${params.reference_data_bucket}/pipelines/exomiser-nf/application.properties"
auto_config_yml = "${params.reference_data_bucket}/pipelines/exomiser-nf/auto_config.yml"
}
12 changes: 6 additions & 6 deletions conf/tests/full/test_full_single_vcf.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
params {
families_file = 's3://lifebit-featured-datasets/pipelines/exomiser-nf/single_vcf.tsv'
hpo_terms_file = 's3://lifebit-featured-datasets/pipelines/exomiser-nf/hpo_terms_file.txt'
prioritisers = 'hiPhivePrioritiser'
exomiser_profile_files = 'full'
application_properties = 's3://lifebit-featured-datasets/pipelines/exomiser-nf/application.properties'
auto_config_yml = 's3://lifebit-featured-datasets/pipelines/exomiser-nf/auto_config.yml'
families_file = "${params.reference_data_bucket}/pipelines/exomiser-nf/single_vcf.tsv"
hpo_terms_file = "${params.reference_data_bucket}/pipelines/exomiser-nf/hpo_terms_file.txt"
prioritisers = "hiPhivePrioritiser"
exomiser_profile_files = "full"
application_properties = "${params.reference_data_bucket}/pipelines/exomiser-nf/application.properties"
auto_config_yml = "${params.reference_data_bucket}/pipelines/exomiser-nf/auto_config.yml"
}
12 changes: 11 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ log.info ""
// Check input parameters
// ---------------------------------------------------*/

def replaceBucket(file, bucket="${params.reference_data_bucket}", pattern="${params.bucket_pattern}") {
reg_exp = ~/(s3:\/\/[a-zA-Z0-9\-]*$pattern)/
file = file.toString()
if (file =~ reg_exp) {
replace_bucket = (file =~ reg_exp)[0]
file = file.replaceAll(replace_bucket[0], bucket)
}
return file
}

if(params.families_file) {
Channel
.fromPath( "${params.families_file}")
Expand All @@ -60,7 +70,7 @@ Channel
.fromPath(params.families_file)
.ifEmpty { exit 1, "Cannot find input file : ${params.families_file}" }
.splitCsv(header:true, sep:'\t', strip: true)
.map {row -> [ row.proband_id, file(row.vcf_path), file(row.vcf_index_path)] }
.map {row -> [ row.proband_id, file(replaceBucket(row.vcf_path)), file(replaceBucket(row.vcf_index_path))] }
.into {ch_vcf_paths; ch_vcf_paths2}

// Conditional creation of channels, custom if provided else default from bin/
Expand Down
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ profiles {
awsbatch { includeConfig 'conf/executors/awsbatch.config' }
eu_west_1 { includeConfig 'conf/cloud-region/eu_west_1.config' }
eu_west_2 { includeConfig 'conf/cloud-region/eu_west_2.config' }
ap_southeast_1 { includeConfig 'conf/cloud-region/ap_southeast_1.config' }
test_full { includeConfig "conf/tests/full/test_full.config" }
test_full_family { includeConfig 'conf/tests/full/test_full_family.config' }
test_full_single_vcf { includeConfig 'conf/tests/full/test_full_single_vcf.config' }
Expand Down
Loading