Skip to content

Commit

Permalink
Fix FILTER_MAF process
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Grande committed Sep 19, 2022
1 parent f9fd807 commit 2469a50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/filter_maf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
writer = csv.DictWriter(outfile, reader.fieldnames, delimiter='\t')
writer.writeheader()
for row in reader:
if row['FILTER'] == 'PASS':
if row['FILTER'].lower().strip() in {'pass', '.', ''}:
writer.writerow(row)
9 changes: 6 additions & 3 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ process VCF2MAF {
// Process for filtering MAF files for passed variants
process FILTER_MAF {

tag "${input_maf.name}"
tag "${meta.synapse_id}"

container "python:3.10.4"

Expand Down Expand Up @@ -203,12 +203,15 @@ workflow STUDY_MAFS {
sample_mafs

main:
// Only consider releasable MAF files
releasable_mafs = sample_mafs
.filter { meta, maf -> meta.is_releasable }

// Filter MAF files for passed variants
FILTER_MAF(sample_mafs)
FILTER_MAF(releasable_mafs)

// Group MAF files by study and merge
mafs_by_study_ch = FILTER_MAF.out
.filter { meta, maf -> meta.is_releasable }
.map { meta, maf -> subset_study_meta(meta, maf) }
.groupTuple( by: 0 )
MERGE_MAFS(mafs_by_study_ch)
Expand Down

0 comments on commit 2469a50

Please sign in to comment.