From 515105998b90ad026adb0443b919209c63fc53c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20W=C3=B6ste?= Date: Mon, 9 Oct 2017 17:50:01 +0200 Subject: [PATCH] Rename 'svType' column to 'type' Not all variants are necessarily 'SVs' --- README.md | 2 +- .../java/de/imi/marw/viper/variants/table/VariantTable.java | 2 +- .../imi/marw/viper/test/variants/CallStringifierTest.java | 2 +- src/test/resources/api/expected-column-names.json | 2 +- src/test/resources/api/expected-first-row.json | 2 +- src/test/resources/api/expected-related-calls.json | 6 +++--- src/test/resources/api/expected-related-column-names.json | 2 +- src/test/resources/api/expected-rows.json | 6 +++--- src/test/resources/examples-edge-cases.csv | 2 +- src/test/resources/examples-empty.csv | 2 +- src/test/resources/examples-filtering.csv | 2 +- src/test/resources/examples-small.csv | 2 +- src/test/resources/examples-unclustered.csv | 2 +- src/test/resources/examples.csv | 2 +- src/test/resources/vcf-import-complex-all.csv | 2 +- src/test/resources/vcf-import-complex-nonref.csv | 2 +- src/test/resources/vcf-import-simple-all.csv | 2 +- src/test/resources/vcf-import-simple-nonref.csv | 2 +- 18 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index d1b1507..3b00ac8 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ These parameters act as input to the VIPER server and must be specified by the u | parameter | description | |-------| ----------- | -| *analysisFile* | File containing variant calls (must be a `.csv` or `.vcf` file). `.csv` files must include a header with column names. Columns `sample`, `svType`, `chr1`, `bp1`, `chr2` and `bp2` are mandatory. +| *analysisFile* | File containing variant calls (must be a `.csv` or `.vcf` file). `.csv` files must include a header with column names. Columns `sample`, `type`, `chr1`, `bp1`, `chr2` and `bp2` are mandatory. | *workDir* | Directory that stores images by igv and decision progress. **WARNING: Do not delete this directory, or your progress will be lost** | | *bamDir* | Directory containing your `.bam`/`.bai` sample files. | diff --git a/src/main/java/de/imi/marw/viper/variants/table/VariantTable.java b/src/main/java/de/imi/marw/viper/variants/table/VariantTable.java index 019f231..a71a11d 100644 --- a/src/main/java/de/imi/marw/viper/variants/table/VariantTable.java +++ b/src/main/java/de/imi/marw/viper/variants/table/VariantTable.java @@ -37,7 +37,7 @@ */ public class VariantTable { - public static final String TYPE_COLUMN_NAME = "svType"; + public static final String TYPE_COLUMN_NAME = "type"; public static final String SAMPLE_COLUMN_NAME = "sample"; public static final String CHR1_COLUMN_NAME = "chr1"; public static final String CHR2_COLUMN_NAME = "chr2"; diff --git a/src/test/java/de/imi/marw/viper/test/variants/CallStringifierTest.java b/src/test/java/de/imi/marw/viper/test/variants/CallStringifierTest.java index eac4f6a..1bf80a9 100644 --- a/src/test/java/de/imi/marw/viper/test/variants/CallStringifierTest.java +++ b/src/test/java/de/imi/marw/viper/test/variants/CallStringifierTest.java @@ -41,7 +41,7 @@ public void callsAreCorrectlyTurnedIntoStrings() { VariantTable table = new CsvTableReader(';', ",").readTable(TestUtil.getResourceFile("examples-small.csv")); List> expectedStrings = Arrays.asList( - Arrays.asList("sample", "svType", "chr1", "bp1", "chr2", "bp2", "strColl", "numColl", "naColl"), + Arrays.asList("sample", "type", "chr1", "bp1", "chr2", "bp2", "strColl", "numColl", "naColl"), Arrays.asList("SAMPLE1", "DELETION", "X", "1000000", "X", "2000000", "hallo, huhu", "1", "NA"), Arrays.asList("SAMPLE1", "DELETION", "1", "1000000", "1", "2000000", "blub", "1, 2, 3, 4", "NA"), Arrays.asList("SAMPLE2", "DELETION", "2", "1000000", "2", "2000000", "NA", "NA", "NA"), diff --git a/src/test/resources/api/expected-column-names.json b/src/test/resources/api/expected-column-names.json index bcf81e4..c98ee52 100644 --- a/src/test/resources/api/expected-column-names.json +++ b/src/test/resources/api/expected-column-names.json @@ -2,7 +2,7 @@ "viperId", "viperDecision", "sample", -"svType", +"type", "chr1", "bp1", "chr2", diff --git a/src/test/resources/api/expected-first-row.json b/src/test/resources/api/expected-first-row.json index e049e68..bfeff75 100644 --- a/src/test/resources/api/expected-first-row.json +++ b/src/test/resources/api/expected-first-row.json @@ -2,7 +2,7 @@ "viperId":"VAR01", "viperDecision":"NA", "sample":["SIM1"], -"svType":["DELETION"], +"type":["DELETION"], "chr1":["1"], "bp1":3.6933582E7, "chr2":["1"], diff --git a/src/test/resources/api/expected-related-calls.json b/src/test/resources/api/expected-related-calls.json index e9dc6c8..b6ce0e1 100644 --- a/src/test/resources/api/expected-related-calls.json +++ b/src/test/resources/api/expected-related-calls.json @@ -1,6 +1,6 @@ [{ "sample":"SIM1", -"svType":"DELETION", +"type":"DELETION", "chr1":"2", "bp1":2.5459763E7, "chr2":"2", @@ -16,7 +16,7 @@ "combinedValue":[null] },{ "sample":"SIM1", -"svType":"DELETION", +"type":"DELETION", "chr1":"2", "bp1":2.5459763E7, "chr2":"2", @@ -32,7 +32,7 @@ "combinedValue":[null] },{ "sample":"SIM1", -"svType":"DELETION", +"type":"DELETION", "chr1":"2", "bp1":2.5459764E7, "chr2":"2", diff --git a/src/test/resources/api/expected-related-column-names.json b/src/test/resources/api/expected-related-column-names.json index 753d66f..af3d236 100644 --- a/src/test/resources/api/expected-related-column-names.json +++ b/src/test/resources/api/expected-related-column-names.json @@ -1,6 +1,6 @@ [ "sample", -"svType", +"type", "chr1", "bp1", "chr2", diff --git a/src/test/resources/api/expected-rows.json b/src/test/resources/api/expected-rows.json index 9ea5a2d..d0d90fd 100644 --- a/src/test/resources/api/expected-rows.json +++ b/src/test/resources/api/expected-rows.json @@ -2,7 +2,7 @@ "viperId":"VAR02", "viperDecision":"NA", "sample":["SIM1"], -"svType":["DELETION"], +"type":["DELETION"], "chr1":["2"], "bp1":2.5459768E7, "chr2":["2"], @@ -20,7 +20,7 @@ "viperId":"VAR03", "viperDecision":"NA", "sample":["SIM1"], -"svType":["DELETION"], +"type":["DELETION"], "chr1":["2"], "bp1":2.5470618E7, "chr2":["2"], @@ -38,7 +38,7 @@ "viperId":"VAR04", "viperDecision":"NA", "sample":["SIM1"], -"svType":["DELETION"], +"type":["DELETION"], "chr1":["2"], "bp1":2.5459763E7, "chr2":["2"], diff --git a/src/test/resources/examples-edge-cases.csv b/src/test/resources/examples-edge-cases.csv index b56c478..a75317e 100644 --- a/src/test/resources/examples-edge-cases.csv +++ b/src/test/resources/examples-edge-cases.csv @@ -1,2 +1,2 @@ -"sample" "svType" "chr1" "bp1" "chr2" "bp2" "strColl" "numColl" +"sample" "type" "chr1" "bp1" "chr2" "bp2" "strColl" "numColl" " Åloha|öäüß##" "DEL" "MT" "123" "X" "250" "blub_ asdf" "1,2,3" diff --git a/src/test/resources/examples-empty.csv b/src/test/resources/examples-empty.csv index 486e445..7efbc1b 100644 --- a/src/test/resources/examples-empty.csv +++ b/src/test/resources/examples-empty.csv @@ -1 +1 @@ -sample;svType;chr1;bp1;chr2;bp2 +sample;type;chr1;bp1;chr2;bp2 diff --git a/src/test/resources/examples-filtering.csv b/src/test/resources/examples-filtering.csv index d7ddbe8..c23cb7a 100644 --- a/src/test/resources/examples-filtering.csv +++ b/src/test/resources/examples-filtering.csv @@ -1,4 +1,4 @@ -viperId;sample;svType;chr1;bp1;chr2;bp2;strColl;numColl;num;str +viperId;sample;type;chr1;bp1;chr2;bp2;strColl;numColl;num;str V1;SAMPLE4;DUPLICATION;2;100000010;2;100000110;NA;1;5;NA V2;SAMPLE1;DELETION;X;123000000;X;123000010;STR1,STR2;1,2,3,4;4;HALLO V3;SAMPLE2;TRANSLOCATION;1;19000000;2;20000000;NA;NA;3;NA diff --git a/src/test/resources/examples-small.csv b/src/test/resources/examples-small.csv index d713fb2..8555ca7 100644 --- a/src/test/resources/examples-small.csv +++ b/src/test/resources/examples-small.csv @@ -1,4 +1,4 @@ -sample;svType;chr1;bp1;chr2;bp2;strColl;numColl;naColl +sample;type;chr1;bp1;chr2;bp2;strColl;numColl;naColl SAMPLE1;DELETION;X;1000000;X;2000000;hallo,huhu;1;NA SAMPLE1;DELETION;1;1000000;1;2000000;blub;1,2,3,4;NA SAMPLE2;DELETION;2;1000000;2;2000000;NA;NA;NA diff --git a/src/test/resources/examples-unclustered.csv b/src/test/resources/examples-unclustered.csv index 97b9438..c84475d 100644 --- a/src/test/resources/examples-unclustered.csv +++ b/src/test/resources/examples-unclustered.csv @@ -1,4 +1,4 @@ -sample;svType;chr1;bp1;chr2;bp2;genes;na +sample;type;chr1;bp1;chr2;bp2;genes;na SAMPLE4;DUPLICATION;2;100000010;2;100000110;GEN3;NA SAMPLE1;DELETION;X;123000000;X;123000010;NA;NA SAMPLE2;TRANSLOCATION;1;19000000;2;20000000;NA;NA diff --git a/src/test/resources/examples.csv b/src/test/resources/examples.csv index 8e34ac3..2327aed 100644 --- a/src/test/resources/examples.csv +++ b/src/test/resources/examples.csv @@ -1,4 +1,4 @@ -sample;svType;chr1;bp1;chr2;bp2;supporting;tool;genes;database;cov1;cov2;qual1;qual2;combinedValue +sample;type;chr1;bp1;chr2;bp2;supporting;tool;genes;database;cov1;cov2;qual1;qual2;combinedValue SIM1;DELETION;1;36933582;1;36933621;10.0877192982;BreaKmer;CSF3R;NA;611.2222222222;358.987654321;35.0367205963;35.4265424032;NA SIM1;DELETION;1;36933582;1;36933621;26.1363636364;Pindel;CSF3R;NA;611.2222222222;358.987654321;35.0367205963;35.4265424032;NA SIM1;DELETION;2;25459763;2;25459832;36.2694300518;Socrates;DNMT3A;NA;1116.4691358025;2377.8024691358;35.3872216202;34.8203393527;NA diff --git a/src/test/resources/vcf-import-complex-all.csv b/src/test/resources/vcf-import-complex-all.csv index 99770b2..62da361 100644 --- a/src/test/resources/vcf-import-complex-all.csv +++ b/src/test/resources/vcf-import-complex-all.csv @@ -1,4 +1,4 @@ -sample;svType;chr1;bp1;chr2;bp2;ID;REF;ALT;QUAL;FILTER;INFO:NS;INFO:DP;INFO:AF;INFO:AA;INFO:DB;INFO:H2;FORMAT:GT;FORMAT:GQ;FORMAT:DP;FORMAT:HQ +sample;type;chr1;bp1;chr2;bp2;ID;REF;ALT;QUAL;FILTER;INFO:NS;INFO:DP;INFO:AF;INFO:AA;INFO:DB;INFO:H2;FORMAT:GT;FORMAT:GQ;FORMAT:DP;FORMAT:HQ NA00001;SNP;20;14370;20;14370;rs6054257;G;A;29;PASS;3;14;0.5;NA;true;NA;G|G;48;1;51 NA00002;SNP;20;14370;20;14370;rs6054257;G;A;29;PASS;3;14;0.5;NA;true;NA;A|G;48;8;51 NA00003;SNP;20;14370;20;14370;rs6054257;G;A;29;PASS;3;14;0.5;NA;true;NA;A/A;43;5;NA diff --git a/src/test/resources/vcf-import-complex-nonref.csv b/src/test/resources/vcf-import-complex-nonref.csv index 5501cdf..828636a 100644 --- a/src/test/resources/vcf-import-complex-nonref.csv +++ b/src/test/resources/vcf-import-complex-nonref.csv @@ -1,4 +1,4 @@ -sample;svType;chr1;bp1;chr2;bp2;ID;REF;ALT;QUAL;FILTER;INFO:NS;INFO:DP;INFO:AF;INFO:AA;INFO:DB;INFO:H2;FORMAT:GT;FORMAT:GQ;FORMAT:DP;FORMAT:HQ +sample;type;chr1;bp1;chr2;bp2;ID;REF;ALT;QUAL;FILTER;INFO:NS;INFO:DP;INFO:AF;INFO:AA;INFO:DB;INFO:H2;FORMAT:GT;FORMAT:GQ;FORMAT:DP;FORMAT:HQ NA00002;SNP;20;14370;20;14370;rs6054257;G;A;29;PASS;3;14;0.5;NA;true;NA;A|G;48;8;51 NA00003;SNP;20;14370;20;14370;rs6054257;G;A;29;PASS;3;14;0.5;NA;true;NA;A/A;43;5;NA NA00002;SNP;20;17330;20;17330;NA;T;A;3;q10;3;11;0.017;NA;NA;NA;T|A;3;5;65, 3 diff --git a/src/test/resources/vcf-import-simple-all.csv b/src/test/resources/vcf-import-simple-all.csv index 8ca9acf..e79d7f6 100644 --- a/src/test/resources/vcf-import-simple-all.csv +++ b/src/test/resources/vcf-import-simple-all.csv @@ -1,4 +1,4 @@ -sample;svType;chr1;bp1;chr2;bp2;ID;REF;ALT;QUAL;FILTER +sample;type;chr1;bp1;chr2;bp2;ID;REF;ALT;QUAL;FILTER NA00001;SNP;20;14370;20;14370;rs6054257;G;A;29;PASS NA00002;SNP;20;14370;20;14370;rs6054257;G;A;29;PASS NA00003;SNP;20;14370;20;14370;rs6054257;G;A;29;PASS diff --git a/src/test/resources/vcf-import-simple-nonref.csv b/src/test/resources/vcf-import-simple-nonref.csv index 13b7be7..1211abf 100644 --- a/src/test/resources/vcf-import-simple-nonref.csv +++ b/src/test/resources/vcf-import-simple-nonref.csv @@ -1,4 +1,4 @@ -sample;svType;chr1;bp1;chr2;bp2;ID;REF;ALT;QUAL;FILTER +sample;type;chr1;bp1;chr2;bp2;ID;REF;ALT;QUAL;FILTER NA00002;SNP;20;14370;20;14370;rs6054257;G;A;29;PASS NA00003;SNP;20;14370;20;14370;rs6054257;G;A;29;PASS NA00002;SNP;20;17330;20;17330;NA;T;A;3;q10