-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use project name instead of multisample (#264)
- Loading branch information
Showing
25 changed files
with
244 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
process CREATE_PEDIGREE_FILE { | ||
tag "${project}" | ||
label 'process_single' | ||
|
||
conda "conda-forge::python=3.8.3" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/python:3.8.3' : | ||
'biocontainers/python:3.8.3' }" | ||
|
||
input: | ||
tuple val(project), val(samples) | ||
|
||
output: | ||
tuple val(project), path("*.ped"), emit: ped | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def out = new File(project + ".ped") | ||
outfile_text = ['#family_id', 'sample_id', 'father', 'mother', 'sex', 'phenotype'].join('\\t') | ||
def samples_list = [] | ||
for(int i = 0; i<samples.size(); i++) { | ||
sample_name = samples[i].id | ||
if (!samples_list.contains(sample_name)) { | ||
outfile_text += "\\n" + [samples[i].family_id, sample_name, samples[i].paternal_id, samples[i].maternal_id, samples[i].sex, samples[i].phenotype].join('\\t') | ||
samples_list.add(sample_name) | ||
} | ||
} | ||
""" | ||
echo -e "$outfile_text" >${project}.ped | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
create_pedigree_file: v1.0 | ||
python: \$(python --version | sed 's/Python //g') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
""" | ||
touch ${project}.ped | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
create_pedigree_file: v1.0 | ||
python: \$(python --version | sed 's/Python //g') | ||
END_VERSIONS | ||
""" | ||
} |
Oops, something went wrong.