Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Write out SV callers as array (#81)
Browse files Browse the repository at this point in the history
Closes: #81
Related-Issue: #81
Projected-Results-Impact: none
  • Loading branch information
holtgrewe committed Sep 20, 2022
1 parent 68d7329 commit 1fcf2c8
Show file tree
Hide file tree
Showing 65 changed files with 243 additions and 2,843 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

## v0.27 (work in progress)

**IMPORTANT COMPATIBILITY NOTE:**
For annotating SVs, the output of this version is not compatible with `varfish-server` v1.2 (Anthenea) and early versions of the v2 (Bollonaster) development branch.
You can generate compatible files by adding the `--opt-out=chrom2-columns,dbcounts-columns,callers-array` as arguments to `annotate-svs`.

- Writing out proper SV type for Dragen CNV (#76)
- Adding support for depth of coverage annotation (#73)
- Ensure output files are sorted by chromosomes (#79)
- Merge multiple input VCFs in annotate-svs with clustering (#75)
- Write out SV callers as array (#81)

## v0.26

Expand Down
4 changes: 2 additions & 2 deletions tests/hg19-chr22/Case_1_index.delly2.gts.tsv-expected
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
release chromosome chromosome_no bin chromosome2 chromosome_no2 bin2 pe_orientation start end start_ci_left start_ci_right end_ci_left end_ci_right case_id set_id sv_uuid caller sv_type sv_sub_type info num_hom_alt num_hom_ref num_het num_hemi_alt num_hemi_ref genotype
GRCh37 22 22 89 22 22 89 3to5 17400000 17700000 -29 29 -29 29 . . UUID EMBL.DELLYv1.1.3 DEL DEL {"""affectedCarriers""":0,"""backgroundCarriers""":0,"""unaffectedCarriers""":0} 0 2 1 0 0 {"""Case_1_father-N1-DNA1-WGS1""":{"""cn""":2,"""ft""":["""LowQual"""],"""gq""":14,"""gt""":"""0/1""","""pec""":0,"""pev""":0,"""src""":34,"""srv""":4},"""Case_1_index-N1-DNA1-WGS1""":{"""cn""":2,"""gq""":35,"""gt""":"""0/0""","""pec""":0,"""pev""":0,"""src""":29,"""srv""":2},"""Case_1_mother-N1-DNA1-WGS1""":{"""cn""":2,"""gq""":67,"""gt""":"""0/0""","""pec""":0,"""pev""":0,"""src""":32,"""srv""":1}}
release chromosome chromosome_no bin chromosome2 chromosome_no2 bin2 pe_orientation start end start_ci_left start_ci_right end_ci_left end_ci_right case_id set_id sv_uuid callers sv_type sv_sub_type info num_hom_alt num_hom_ref num_het num_hemi_alt num_hemi_ref genotype
GRCh37 22 22 89 22 22 89 3to5 17400000 17700000 -29 29 -29 29 . . UUID {"EMBL.DELLYv1.1.3"} DEL DEL {"""affectedCarriers""":0,"""backgroundCarriers""":0,"""unaffectedCarriers""":0} 0 2 1 0 0 {"""Case_1_father-N1-DNA1-WGS1""":{"""cn""":2,"""ft""":["""LowQual"""],"""gq""":14,"""gt""":"""0/1""","""pec""":0,"""pev""":0,"""src""":34,"""srv""":4},"""Case_1_index-N1-DNA1-WGS1""":{"""cn""":2,"""gq""":35,"""gt""":"""0/0""","""pec""":0,"""pev""":0,"""src""":29,"""srv""":2},"""Case_1_mother-N1-DNA1-WGS1""":{"""cn""":2,"""gq""":67,"""gt""":"""0/0""","""pec""":0,"""pev""":0,"""src""":32,"""srv""":1}}
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,8 @@ private void writeRecords(List<GenotypeRecord> chromRecords, Writer writer) thro
writer.write(
record.toTsv(
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_CHROM2_COLUMNS),
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_DBCOUNTS_COLUMNS)));
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_DBCOUNTS_COLUMNS),
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_CALLERS_ARRAY)));
writer.write('\n');
}
}
Expand Down Expand Up @@ -587,7 +588,8 @@ private void checkOptOutFeatures() {
ImmutableList.of(
GtRecordBuilder.FEATURE_CHROM2_COLUMNS,
GtRecordBuilder.FEATURE_DBCOUNTS_COLUMNS,
GtRecordBuilder.FEATURE_SUPPRESS_CARRIER_COUNTS);
GtRecordBuilder.FEATURE_SUPPRESS_CARRIER_COUNTS,
GtRecordBuilder.FEATURE_CALLERS_ARRAY);
final String features[] = args.getOptOutFeatures().split(",");
boolean allGood = true;
for (String feature : features) {
Expand Down Expand Up @@ -651,7 +653,8 @@ private void annotateSvVcf(
gtWriter.append(
GenotypeRecord.tsvHeader(
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_CHROM2_COLUMNS),
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_DBCOUNTS_COLUMNS))
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_DBCOUNTS_COLUMNS),
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_CALLERS_ARRAY))
+ "\n");
// Write feature-effects header.
featureEffectsWriter.append(Joiner.on("\t").join(HEADERS_FEATURE_EFFECTS) + "\n");
Expand Down Expand Up @@ -893,7 +896,8 @@ private void annotateVariantContext(
gtWriter.append(
gtOutRec.toTsv(
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_CHROM2_COLUMNS),
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_DBCOUNTS_COLUMNS))
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_DBCOUNTS_COLUMNS),
!args.getOptOutFeatures().contains(GtRecordBuilder.FEATURE_CALLERS_ARRAY))
+ "\n");
} catch (IOException e) {
throw new VarfishAnnotatorException("Problem writing to genotypes call file.", e);
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ void testWithTrio(boolean gzipOutput) throws IOException {
+ "GRCh37\tvarfish-annotator\tnull\n"
+ "GRCh37\tvarfish-annotator-db\tfor-testing\n";
final String expectedGts =
"release\tchromosome\tchromosome_no\tbin\tchromosome2\tchromosome_no2\tbin2\tpe_orientation\tstart\tend\tstart_ci_left\tstart_ci_right\tend_ci_left\tend_ci_right\tcase_id\tset_id\tsv_uuid\tcaller\tsv_type\tsv_sub_type\tinfo\tnum_hom_alt\tnum_hom_ref\tnum_het\tnum_hemi_alt\tnum_hemi_ref\tgenotype\n"
+ "GRCh37\t22\t22\t89\t22\t22\t89\t3to5\t17400000\t17700000\t-29\t29\t-29\t29\t.\t.\t00000000-0000-0000-0000-000000000000\tEMBL.DELLYv1.1.3\tDEL\tDEL\t{\"\"\"affectedCarriers\"\"\":0,\"\"\"backgroundCarriers\"\"\":0,\"\"\"unaffectedCarriers\"\"\":0}\t0\t2\t1\t0\t0\t{\"\"\"Case_1_father-N1-DNA1-WGS1\"\"\":{\"\"\"cn\"\"\":2,\"\"\"ft\"\"\":[\"\"\"LowQual\"\"\"],\"\"\"gq\"\"\":14,\"\"\"gt\"\"\":\"\"\"0/1\"\"\",\"\"\"pec\"\"\":0,\"\"\"pev\"\"\":0,\"\"\"src\"\"\":34,\"\"\"srv\"\"\":4},\"\"\"Case_1_index-N1-DNA1-WGS1\"\"\":{\"\"\"cn\"\"\":2,\"\"\"gq\"\"\":35,\"\"\"gt\"\"\":\"\"\"0/0\"\"\",\"\"\"pec\"\"\":0,\"\"\"pev\"\"\":0,\"\"\"src\"\"\":29,\"\"\"srv\"\"\":2},\"\"\"Case_1_mother-N1-DNA1-WGS1\"\"\":{\"\"\"cn\"\"\":2,\"\"\"gq\"\"\":67,\"\"\"gt\"\"\":\"\"\"0/0\"\"\",\"\"\"pec\"\"\":0,\"\"\"pev\"\"\":0,\"\"\"src\"\"\":32,\"\"\"srv\"\"\":1}}\n";
"release\tchromosome\tchromosome_no\tbin\tchromosome2\tchromosome_no2\tbin2\tpe_orientation\tstart\tend\tstart_ci_left\tstart_ci_right\tend_ci_left\tend_ci_right\tcase_id\tset_id\tsv_uuid\tcallers\tsv_type\tsv_sub_type\tinfo\tnum_hom_alt\tnum_hom_ref\tnum_het\tnum_hemi_alt\tnum_hemi_ref\tgenotype\n"
+ "GRCh37\t22\t22\t89\t22\t22\t89\t3to5\t17400000\t17700000\t-29\t29\t-29\t29\t.\t.\t00000000-0000-0000-0000-000000000000\t{\"EMBL.DELLYv1.1.3\"}\tDEL\tDEL\t{\"\"\"affectedCarriers\"\"\":0,\"\"\"backgroundCarriers\"\"\":0,\"\"\"unaffectedCarriers\"\"\":0}\t0\t2\t1\t0\t0\t{\"\"\"Case_1_father-N1-DNA1-WGS1\"\"\":{\"\"\"cn\"\"\":2,\"\"\"ft\"\"\":[\"\"\"LowQual\"\"\"],\"\"\"gq\"\"\":14,\"\"\"gt\"\"\":\"\"\"0/1\"\"\",\"\"\"pec\"\"\":0,\"\"\"pev\"\"\":0,\"\"\"src\"\"\":34,\"\"\"srv\"\"\":4},\"\"\"Case_1_index-N1-DNA1-WGS1\"\"\":{\"\"\"cn\"\"\":2,\"\"\"gq\"\"\":35,\"\"\"gt\"\"\":\"\"\"0/0\"\"\",\"\"\"pec\"\"\":0,\"\"\"pev\"\"\":0,\"\"\"src\"\"\":29,\"\"\"srv\"\"\":2},\"\"\"Case_1_mother-N1-DNA1-WGS1\"\"\":{\"\"\"cn\"\"\":2,\"\"\"gq\"\"\":67,\"\"\"gt\"\"\":\"\"\"0/0\"\"\",\"\"\"pec\"\"\":0,\"\"\"pev\"\"\":0,\"\"\"src\"\"\":32,\"\"\"srv\"\"\":1}}\n";
final String expectedFeatureEffects =
"case_id\tset_id\tsv_uuid\trefseq_gene_id\trefseq_transcript_id\trefseq_transcript_coding\trefseq_effect\tensembl_gene_id\tensembl_transcript_id\tensembl_transcript_coding\tensembl_effect\n"
+ ".\t.\t00000000-0000-0000-0000-000000000000\t51816\tNM_017424.2\tTRUE\t{\"transcript_ablation\",\"coding_transcript_variant\"}\tENSG00000093072\tENST00000262607.3\tTRUE\t{\"transcript_ablation\",\"coding_transcript_variant\"}\n"
Expand Down
Loading

0 comments on commit 1fcf2c8

Please sign in to comment.