Skip to content

Commit

Permalink
starter
Browse files Browse the repository at this point in the history
  • Loading branch information
MattWellie committed Oct 29, 2024
1 parent 556e4c7 commit b3ea9fc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
3 changes: 3 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ $projectDir = params.projectDir

// Set the cohort name for this whole run
params.cohort = "COHORT"
params.pedigree = "data/pedigree.ped"
params.hpo = "hpo.obo"
params.mt = "data/fake.mt"

// Primary input (samplesheet in CSV format with ID and file path, one sample per line)
params.reads_bam = "${projectDir}/data/samplesheet.csv"
Expand Down
23 changes: 12 additions & 11 deletions talos.nf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ process GeneratePanelData {
path "${params.cohort}_hpo_panel_data.json"

"""
GeneratePanelData -i ${pedigree} --hpo ${hpo} --out_path ${params.cohort}_hpo_panel_data.json
GeneratePanelData -i ${pedigree} --hpo ${hpo} --out_path ${params.cohort}_hpo_panel_data.json -h
touch ${params.cohort}_hpo_panel_data.json
"""
}

Expand All @@ -42,7 +43,8 @@ process QueryPanelapp {

// the command
"""
QueryPanelapp --panels ${panel_data} --out_path ${params.cohort}_panelapp_results.json
QueryPanelapp --panels ${hpo_panel_matches} --out_path ${params.cohort}_panelapp_results.json -h
touch ${params.cohort}_panelapp_results.json
"""
}

Expand Down Expand Up @@ -79,7 +81,7 @@ process RunHailFiltering {
def checkpoint = checkpoint.name != 'NO_FILE' ? "${checkpoint}" : ''

"""
RunHailFilteringSV \
RunHailFiltering \
--mt ${matrix_table} \
--panelapp ${panelapp_data} \
--pedigree ${pedigree} \
Expand Down Expand Up @@ -122,7 +124,7 @@ process RunHailFilteringSV {
--vcf_out ${params.cohort}_small_variants.vcf.bgz
"""
}
---

process sayHello {
// this takes the resulting file from the work/hash/hash directory, writes into "results"
publishDir 'results', mode: 'copy'
Expand Down Expand Up @@ -165,13 +167,12 @@ process convertToUpper {
}

workflow {
// existence of these files is necessary for starting the workflow
// so we must open them as a channel, and pass the channel through to the method
pedigree_channel = Channel.fromPath(params.pedigree)

GeneratePanelData(params.pedigree, params.hpo)
// create a channel for inputs from a file
greeting_ch = Channel.fromPath(params.input_file).splitText() { it.trim() }

sayHello(greeting_ch)
// we can do this by saving as an object, or inside the method call
GeneratePanelData(pedigree_channel, Channel.fromPath(params.hpo))

// convert the greeting to uppercase
convertToUpper(sayHello.out)
QueryPanelapp(GeneratePanelData.out)
}

0 comments on commit b3ea9fc

Please sign in to comment.