Skip to content

Commit

Permalink
fix parsing VCFs in JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
nebfield committed Sep 17, 2024
1 parent 3e79280 commit f17b947
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/SamplesheetParser.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,19 @@ class SamplesheetParser {
}

def parseJSON(json) {
// note: we don't check for file existence here
// note: we don't check for file existence here
// relative paths won't work, because the JSON object doesn't use path_prefix
def parsed = json.subMap("chrom", "vcf_import_dosage", "n_chrom", "format")
def parsed = json.subMap("chrom", "vcf_import_dosage", "n_chrom", "format")
parsed.id = json.sampleset
parsed = parsed + getFlagMap(json)
parsed.build = this.target_build
parsed.chrom = truncateChrom(json)

return [parsed, [json.geno, json.variants, json.pheno]]
if (parsed.is_vcf) {
return [parsed, [json.geno]]
} else {
return [parsed, [json.geno, json.variants, json.pheno]]
}
}

def verifySamplesheet(rows) {
Expand Down Expand Up @@ -192,4 +196,3 @@ class SamplesheetParser {
}

}

0 comments on commit f17b947

Please sign in to comment.