public void IndelWithNoLeadingBase() { var tsvReader = new StreamReader(new MemoryStream()); var vcfReader = new StreamReader(new MemoryStream()); var cosmicReader = new MergedCosmicReader(vcfReader, tsvReader, _refChromDict); const string vcfLine1 = "3 10188320 COSM14426 GGTACTGAC A . . GENE=VHL;STRAND=+;CDS=c.463G>A;AA=p.?;CNT=2"; const string vcfLine2 = "3 10188320 COSM18152 G A . . GENE=VHL;STRAND=+;CDS=c.463G>A;AA=p.V155M;CNT=7"; var items = cosmicReader.ExtractCosmicItems(vcfLine1); Assert.Equal("GGTACTGAC", items[0].ReferenceAllele); Assert.Equal("A", items[0].AlternateAllele); Assert.Equal(10188320, items[0].Start); var items2 = cosmicReader.ExtractCosmicItems(vcfLine2); Assert.Equal("G", items2[0].ReferenceAllele); Assert.Equal("A", items2[0].AlternateAllele); Assert.Equal(10188320, items2[0].Start); }
public void IndelWithNoLeadingBase() { var seqProvider = ParserTestUtils.GetSequenceProvider(10188320, "GGTACTGAC", 'A', ChromosomeUtilities.RefNameToChromosome); //the files provided are just for the sake of construction. The main aim is to test the VCF line parsing capabilities var cosmicReader = new MergedCosmicReader(Resources.TopPath("cosm5428243.vcf"), Resources.TopPath("cosm5428243.tsv"), seqProvider); const string vcfLine1 = "3 10188320 COSM14426 GGTACTGAC A . . GENE=VHL;STRAND=+;CDS=c.463G>A;AA=p.?;CNT=2"; const string vcfLine2 = "3 10188320 COSM18152 G A . . GENE=VHL;STRAND=+;CDS=c.463G>A;AA=p.V155M;CNT=7"; var items = cosmicReader.ExtractCosmicItems(vcfLine1); Assert.Equal("GGTACTGAC", items[0].RefAllele); Assert.Equal("A", items[0].AltAllele); Assert.Equal(10188320, items[0].Position); var items2 = cosmicReader.ExtractCosmicItems(vcfLine2); Assert.Equal("G", items2[0].RefAllele); Assert.Equal("A", items2[0].AltAllele); Assert.Equal(10188320, items2[0].Position); }
public void IndelWithNoLeadingBase() { var cosmicReader = new MergedCosmicReader(); const string vcfLine1 = "3 10188320 COSM14426 GGTACTGAC A . . GENE=VHL;STRAND=+;CDS=c.463G>A;AA=p.?;CNT=2"; const string vcfLine2 = "3 10188320 COSM18152 G A . . GENE=VHL;STRAND=+;CDS=c.463G>A;AA=p.V155M;CNT=7"; var sa = new SupplementaryAnnotationPosition(10188320); var saCreator = new SupplementaryPositionCreator(sa); foreach (var cosmicItem in cosmicReader.ExtractCosmicItems(vcfLine1)) { cosmicItem.SetSupplementaryAnnotations(saCreator); } Assert.Equal("9A", sa.CosmicItems[0].SaAltAllele); foreach (var cosmicItem in cosmicReader.ExtractCosmicItems(vcfLine2)) { cosmicItem.SetSupplementaryAnnotations(saCreator); } Assert.Equal("A", sa.CosmicItems[1].SaAltAllele); }