Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
trio-whole-exome
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
igmmbioinformatics
trio-whole-exome
Commits
64d340c7
Commit
64d340c7
authored
2 years ago
by
3mma-mack
Browse files
Options
Downloads
Patches
Plain Diff
run_exomedepth works, adding process to get proband cnvs that are not in parents
parent
84564592
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pipeline/cnv_calling.nf
+52
-11
52 additions, 11 deletions
pipeline/cnv_calling.nf
with
52 additions
and
11 deletions
pipeline/cnv_calling.nf
+
52
−
11
View file @
64d340c7
...
...
@@ -91,34 +91,37 @@ process check_ped_file {
cat $ped_file
"""
}
// process to split ped files into families - send each family to extract_target
// this is done by inputs
// extract_target: take a family and identify the sex. use the sample sheet to get the path to the bam file
// emit a paired object, indicating the sex and the path to the bam file
process run_exomedepth {
label 'medium'
// Take the ped_file line and sample sheet line of a sample, collect relevant information and run exomedepth
// This assumes that the information coming from the input sample channel are in the same order
// so information recieved is for the same sample
// Want to emit a channel of family IDs for next process to use so can find relevant files
input:
path(target_bed)
path(reference_genome)
val(ped_file_info)
val(samplesheet_info)
output:
val \${fam_id} into family_ids
script:
"""
ind_id=\$(echo ${ped_file_info} |cut -c2- | cut -d',' -f1)
fam_id=\$(echo ${ped_file_info} |cut -c2- | cut -d',' -f2)
fam_id=\$(echo ${ped_file_info} |cut -c2- | cut -d',' -f2
| cut -c2-
)
sex=\$(echo ${ped_file_info} |cut -c2- | cut -d',' -f5)
# echo ${ped_file_info}
# echo ${samplesheet_info}
bam_path=\$(echo ${samplesheet_info} | cut -d',' -f4 | cut -c3- | rev | cut -c3- | rev)
# bam_path
# take the pedfile info of a sample, if sex = 1 use male reference if sex = 2 use female reference
# create an input file, adding the path to target to the reference, using cat [bam path from sample_sheet_info] and reference file
...
...
@@ -129,16 +132,52 @@ process run_exomedepth {
echo \${fam_id}
echo \${sex}
echo \${bam_path}
bam_file=\$(echo \${bam_path} | awk -F"/" '{print \$NF}')
# Rscript $workflow.projectDir/pipeline/ExomeDepth_assets/ExomeDepth_basic_own_vignette.R -i $workflow.projectDir/pipeline/ExomeDepth_assets/HG003_4_paths.txt -b ${target_bed} -f ${reference_genome} -t HG002.recal.bam -o $workflow.projectDir/pipeline/ExomeDepth_assets
# if directory for family doesnt exist, create it
mkdir -p "$workflow.projectDir/\${fam_id}"
# make reference file for sample, store in fam directory, depending on sex, if sex is not known use both, maybe return a warning
if [ \${sex} == 1 ]; then
cp $workflow.projectDir/pipeline/ExomeDepth_assets/mini_male_reference.txt $workflow.projectDir/\${fam_id}/\${ind_id}_bam_paths.txt
echo \${bam_path} >> $workflow.projectDir/\${fam_id}/\${ind_id}_bam_paths.txt
elif [ \${sex} == 2 ]; then
cp $workflow.projectDir/pipeline/ExomeDepth_assets/mini_female_reference.txt $workflow.projectDir/\${fam_id}/\${ind_id}_bam_paths.txt
echo \${bam_path} >> $workflow.projectDir/\${fam_id}/\${ind_id}_bam_paths.txt
else
cp $workflow.projectDir/pipeline/ExomeDepth_assets/mini_male_reference.txt $workflow.projectDir/\${fam_id}/\${ind_id}_bam_paths.txt
cat $workflow.projectDir/pipeline/ExomeDepth_assets/mini_female_reference.txt >> $workflow.projectDir/\${fam_id}/\${ind_id}_bam_paths.txt
echo \${bam_path} >> $workflow.projectDir/\${fam_id}/\${ind_id}_bam_paths.txt
fi
# Rscript $workflow.projectDir/pipeline/ExomeDepth_assets/ExomeDepth_basic_own_vignette.R -i $workflow.projectDir/\${fam_id}/\${ind_id}_bam_paths.txt -b ${target_bed} -f ${reference_genome} -t \${bam_file} -o $workflow.projectDir/\${fam_id}
"""
}
// future process to reformat output
// future process to compare proband to parents
process collect_proband_cnvs {
input:
val(family_ids)
script:
"""
echo $family_ids
"""
}
// future process for gnomAD
workflow check_inputs {
...
...
@@ -147,4 +186,6 @@ workflow check_inputs {
check_sample_sheet(read_inputs.out.ch_samplesheet)
check_ped_file(read_inputs.out.ch_ped_file)
run_exomedepth(params.target_bed, params.reference_genome, read_inputs.out.ch_ped_file_info, read_inputs.out.ch_samplesheet_info)
collect_proband_cnvs(run_exomedepth.out.ch_family_ids)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment