Skip to content

Commit

Permalink
feat: output SV runs for circos
Browse files Browse the repository at this point in the history
  • Loading branch information
dnousome committed Dec 6, 2024
1 parent d5583c3 commit 2db5956
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 8 deletions.
27 changes: 22 additions & 5 deletions subworkflows/local/workflows.nf
Original file line number Diff line number Diff line change
Expand Up @@ -556,18 +556,20 @@ workflow SV {
//Manta
if ("manta" in svcall_list){
manta_out=manta_somatic(bamwithsample)
| map{tumor,gsv,so_sv,unfil_sv,unfil_indel ->
tuple(tumor,so_sv,"manta")} | gunzip_manta
manta_out_forsv=manta_out
| map{tumor,normal,gsv,gsv_tbi,so_sv,so_sv_tbi,unfil_sv,unfil_sv_tbi,unfil_indel,unfil_indel_tbi ->
tuple(tumor,so_sv,"manta")} | gunzip_manta
//annotsv_manta(manta_out).ifEmpty("Empty SV input--No SV annotated")
svout=svout | concat(manta_out)
svout=svout | concat(manta_out_forsv)
}

//GRIDSS
if ("gridss" in svcall_list){
gridss_out=gridss_somatic(bamwithsample)
gridss_out_forsv=gridss_out
| map{tumor,normal,vcf,index,bam,gripssvcf,gripsstbi,gripssfilt,filttbi ->
tuple(tumor,gripssfilt,"gridss")} | gunzip_gridss
svout=svout | concat(gridss_out)
tuple(tumor,gripssfilt,"gridss")} | gunzip_gridss
svout=svout | concat(gridss_out_forsv)
}

if (svcall_list.size()>1){
Expand All @@ -577,6 +579,21 @@ workflow SV {
| annotsv_survivor_tn
| ifEmpty("Empty SV input--No SV annotated")
}

if("gridss" in svcall_list){
somaticsv_input=gridss_out
| map{tumor,normal,vcf,index,bam,gripssvcf,gripsstbi,gripssfilt,filttbi ->
tuple(tumor,normal,vcf,index,gripssfilt,filttbi)}
}else if("manta" in svcall_list){
somaticsv_input=manta_out
| map{tumor,normal,gsv,gsv_tbi,so_sv,so_sv_tbi,unfil_sv,unfil_sv_tbi,unfil_indel,unfil_indel_tbi ->
tuple(tumor,normal,unfil_sv,unfil_sv_tbi,so_sv,so_sv_tbi)}
}else{
somaticsv_input=Channel.empty()
}

emit:
somaticsv_input
}

workflow CNVmouse {
Expand Down
22 changes: 19 additions & 3 deletions subworkflows/local/workflows_tonly.nf
Original file line number Diff line number Diff line change
Expand Up @@ -322,31 +322,47 @@ workflow SV_TONLY {
}
//Manta
if ("manta" in svcall_list){

manta_out=manta_tonly(bamwithsample)
.map{tumor, sv, indel, tumorsv ->
tuple(tumor,tumorsv,"manta_tonly")}
annotsv_manta_tonly(manta_out).ifEmpty("Empty SV input--No SV annotated")
svout=svout | concat(manta_out)
}

//GRIDSS
if ("gridss" in svcall_list){
gridss_out=gridss_tonly(bamwithsample)
gridss_out_forsv=gridss_out
| map{tumor,vcf,index,bam,gripssvcf,gripsstbi,gripssfilt,filttbi ->
tuple(tumor,gripssfilt,"gridss_tonly")} | gunzip_gridss
annotsv_gridss_tonly(manta_out).ifEmpty("Empty SV input--No SV annotated")
annotsv_gridss_tonly(gridss_out_forsv).ifEmpty("Empty SV input--No SV annotated")
svout=svout | concat(gridss_out)
}

//Survivor
if (svcall_list.size()>1){
if (svcall_list.size()>1){
//Survivor
svout | groupTuple
| survivor_sv
| annotsv_survivor_tonly
| ifEmpty("Empty SV input--No SV annotated")
}

if("gridss" in svcall_list){
somaticsv_input=gridss_out
| map{tumor,vcf,index,bam,gripssvcf,gripsstbi,gripssfilt,filttbi ->
tuple(tumor,vcf,index,gripsstbi,gripssfilt,filttbi)}
}else if("manta" in svcall_list){
somaticsv_input=manta_out
| map{tumor,gsv,gsv_tbi,so_sv,so_sv_tbi,unfil_sv,unfil_sv_tbi,unfil_indel,unfil_indel_tbi ->
tuple(tumor,unfil_sv,unfil_sv_tbi,so_sv,so_sv_tbi)}
}else{
somaticsv_input=Channel.empty()
}

emit:
somaticsv_input

}


Expand Down

0 comments on commit 2db5956

Please sign in to comment.