private static ITranscript GetGapTranscript() { //NM_000314.4 var regions = new ITranscriptRegion[] { new TranscriptRegion(TranscriptRegionType.Exon, 1, 89623195, 89623860, 1, 666), new TranscriptRegion(TranscriptRegionType.Gap, 1, 89623861, 89623861, 666, 667), new TranscriptRegion(TranscriptRegionType.Exon, 1, 89623862, 89624305, 667, 1110), new TranscriptRegion(TranscriptRegionType.Intron, 1, 89624306, 89653781, 1110, 1111), new TranscriptRegion(TranscriptRegionType.Exon, 2, 89653782, 89653866, 1111, 1195), new TranscriptRegion(TranscriptRegionType.Intron, 2, 89653867, 89685269, 1195, 1196), new TranscriptRegion(TranscriptRegionType.Exon, 3, 89685270, 89685314, 1196, 1240), new TranscriptRegion(TranscriptRegionType.Intron, 3, 89685315, 89690802, 1240, 1241), new TranscriptRegion(TranscriptRegionType.Exon, 4, 89690803, 89690846, 1241, 1284), new TranscriptRegion(TranscriptRegionType.Intron, 4, 89690847, 89692769, 1284, 1285), new TranscriptRegion(TranscriptRegionType.Exon, 5, 89692770, 89693008, 1285, 1523), new TranscriptRegion(TranscriptRegionType.Intron, 5, 89693009, 89711874, 1523, 1524), new TranscriptRegion(TranscriptRegionType.Exon, 6, 89711875, 89712016, 1524, 1665), new TranscriptRegion(TranscriptRegionType.Intron, 6, 89712017, 89717609, 1665, 1666), new TranscriptRegion(TranscriptRegionType.Exon, 7, 89717610, 89717776, 1666, 1832), new TranscriptRegion(TranscriptRegionType.Intron, 7, 89717777, 89720650, 1832, 1833), new TranscriptRegion(TranscriptRegionType.Exon, 8, 89720651, 89720875, 1833, 2057), new TranscriptRegion(TranscriptRegionType.Intron, 8, 89720876, 89725043, 2057, 2058), new TranscriptRegion(TranscriptRegionType.Exon, 9, 89725044, 89728532, 2058, 5546) }; var translation = new Mock <ITranslation>(); translation.SetupGet(x => x.CodingRegion).Returns(new CodingRegion(89624227, 89725229, 1032, 2243, 1212)); var rnaEdits = new IRnaEdit[3]; rnaEdits[0] = new RnaEdit(667, 667, null); rnaEdits[1] = new RnaEdit(707, 707, "C"); rnaEdits[2] = new RnaEdit(5548, 5547, "AAAAAAAAAAAAAAAAAAAAAAAAAA"); var transcript = new Mock <ITranscript>(); transcript.SetupGet(x => x.Id).Returns(CompactId.Convert("NM_000314", 4)); transcript.SetupGet(x => x.Chromosome).Returns(ChromosomeUtilities.Chr10); transcript.SetupGet(x => x.Start).Returns(89623195); transcript.SetupGet(x => x.End).Returns(89728532); transcript.SetupGet(x => x.Gene.OnReverseStrand).Returns(false); transcript.SetupGet(x => x.TranscriptRegions).Returns(regions); transcript.SetupGet(x => x.Translation).Returns(translation.Object); transcript.SetupGet(x => x.TotalExonLength).Returns(5546); transcript.SetupGet(x => x.RnaEdits).Returns(rnaEdits); return(transcript.Object); }
private IRnaEdit[] ReadRnaEdits() { var cols = GetColumns("RnaEdits"); int numRnaEdits = int.Parse(cols[1]); if (numRnaEdits == 0) { return(null); } var rnaEdits = new IRnaEdit[numRnaEdits]; var colIndex = 2; for (var i = 0; i < numRnaEdits; i++) { int start = int.Parse(cols[colIndex++]); int end = int.Parse(cols[colIndex++]); string bases = cols[colIndex++]; rnaEdits[i] = new RnaEdit(start, end, bases); } return(rnaEdits); }
public void RnaEditTypes(int start, int end, string bases, VariantType expectedType) { var rnaEdit = new RnaEdit(start, end, bases); Assert.Equal(expectedType, RnaEditUtilities.GetRnaEditType(rnaEdit)); }