コード例 #1
0
ファイル: JsonOutputTests.cs プロジェクト: YuJiang01/Nirvana
        public void OutputStrandBias()
        {
            var unifiedJson =
                JsonUtilities.GetJson(
                    "chrX	2699246	rs148553620	C	A	250.95	VQSRTrancheSNP99.00to99.90	AC=2;AF=0.250;AN=8;BaseQRankSum=1.719;DB;DP=106;Dels=0.00;FS=20.202;HaplotypeScore=0.0000;MLEAC=2;MLEAF=0.250;MQ=43.50;MQ0=52;MQRankSum=2.955;QD=4.73;ReadPosRankSum=1.024;SB=-1.368e+02;VQSLOD=-0.3503;culprit=MQ;PLF  GT:AD:DP:GQ:PL:AA   0:10,6:16:9:0,9,118:P1,.	   0|1:12,11:23:27:115,0,27:M1,M2   0|0:37,0:37:18:0,18,236:M1,P1   1|0:13,17:30:59:177,0,59:M2,P1", _renamer);

            const string expectedStrandBias = "-136.8";

            Assert.Equal(expectedStrandBias, unifiedJson.StrandBias);

            var observedEntry = unifiedJson.ToString();
            var expectedEntry = $"\"strandBias\":{expectedStrandBias}";

            Assert.Contains(expectedEntry, observedEntry);
        }
コード例 #2
0
ファイル: JsonOutputTests.cs プロジェクト: YuJiang01/Nirvana
        public void RefNoCallStrelkaFields()
        {
            var json =
                JsonUtilities.GetJson(
                    "1	205664649	.	C	.	.	LowQscore	SOMATIC;QSS=3;TQSS=1;NT=ref;QSS_NT=3;TQSS_NT=1;SGT=CC->CC;DP=116;MQ=57.63;MQ0=9;ALTPOS=89;ALTMAP=55;ReadPosRankSum=-1.14;SNVSB=6.63;PNOISE=0.00;PNOISE2=0.00;VQSR=0.15	DP:FDP:SDP:SUBDP:AU:CU:GU:TU	11:4:0:0:0,0:7,8:0,0:0,0	92:28:0:0:5,17:58,62:1,1:0,0", _renamer);

            Assert.NotNull(json);

            const string expectedRecalibratedQuality = "0.15";

            Assert.Equal(expectedRecalibratedQuality, json.RecalibratedQuality);

            const string expectedJointSomaticNormalQuality = "3";

            Assert.Equal(expectedJointSomaticNormalQuality, json.JointSomaticNormalQuality);


            var expectedJointSomaticNormalQualityEntry = $"\"jointSomaticNormalQuality\":{expectedJointSomaticNormalQuality}";
            var expectedRecalibratedQualityEntry       = $"\"recalibratedQuality\":{expectedRecalibratedQuality}";

            Assert.Contains(expectedRecalibratedQualityEntry, json.ToString());
            Assert.Contains(expectedJointSomaticNormalQualityEntry, json.ToString());
        }
コード例 #3
0
ファイル: JsonOutputTests.cs プロジェクト: YuJiang01/Nirvana
        public void OutputStrelkaSnvRelevantFields()
        {
            var json =
                JsonUtilities.GetJson(
                    "2	167760371	rs267598980	G	A	.	PASS	SOMATIC;QSS=34;TQSS=1;NT=ref;QSS_NT=34;TQSS_NT=1;SGT=GG->AG;DP=45;MQ=60.00;MQ0=0;ALTPOS=43;ALTMAP=19;ReadPosRankSum=-1.64;SNVSB=0.00;PNOISE=0.00;PNOISE2=0.00;VQSR=5.54;cosmic=COSM36673;clinvar=other;CSQT=A|XIRP2|ENST00000409195|missense_variant	DP:FDP:SDP:SUBDP:AU:CU:GU:TU	19:0:0:0:0,0:0,0:19,19:0,0	26:0:0:0:6,6:0,0:20,20:0,0", _renamer);

            Assert.NotNull(json);

            const string expectedRecalibratedQuality = "5.54";

            Assert.Equal(expectedRecalibratedQuality, json.RecalibratedQuality);

            const string expectedJointSomaticNormalQuality = "34";

            Assert.Equal(expectedJointSomaticNormalQuality, json.JointSomaticNormalQuality);


            var expectedJointSomaticNormalQualityEntry = $"\"jointSomaticNormalQuality\":{expectedJointSomaticNormalQuality}";
            var expectedRecalibratedQualityEntry       = $"\"recalibratedQuality\":{expectedRecalibratedQuality}";

            Assert.Contains(expectedRecalibratedQualityEntry, json.ToString());
            Assert.Contains(expectedJointSomaticNormalQualityEntry, json.ToString());
        }