Ejemplo n.º 1
0
 private void WriteExon(ITranscriptRegion exon, IRequiredFields requiredFields, IGeneralAttributes attribs,
                        IInterval codingRegion)
 {
     _writer.WriteExonicRegion(exon, requiredFields, attribs, exon.Id, "exon");
     WriteCds(codingRegion, exon, requiredFields, attribs);
     WriteUtr(codingRegion, exon, requiredFields, attribs);
 }
Ejemplo n.º 2
0
        private void WriteCds(IInterval codingRegion, ITranscriptRegion exon, IRequiredFields requiredFields, IGeneralAttributes attribs)
        {
            if (!GffUtilities.HasCds(codingRegion, exon))
            {
                return;
            }
            var cds = GffUtilities.GetCdsCoordinates(codingRegion, exon);

            _writer.WriteExonicRegion(cds, requiredFields, attribs, exon.Id, "CDS");
        }
Ejemplo n.º 3
0
        private void Write5PrimeUtr(IInterval codingRegion, ITranscriptRegion exon, IRequiredFields requiredFields,
                                    IGeneralAttributes attribs)
        {
            int utrEnd = codingRegion.Start - 1;

            if (utrEnd > exon.End)
            {
                utrEnd = exon.End;
            }
            _writer.WriteExonicRegion(new Interval(exon.Start, utrEnd), requiredFields, attribs, exon.Id, "UTR");
        }
Ejemplo n.º 4
0
        private void WriteGene(IGene gene, IRequiredFields requiredFields, string geneId, int internalGeneId)
        {
            if (_observedGenes.Contains(internalGeneId))
            {
                return;
            }

            _observedGenes.Add(internalGeneId);
            var gffGene = GetGene(gene, geneId);

            _writer.WriteGene(gffGene, requiredFields, internalGeneId);
        }
Ejemplo n.º 5
0
 private void WriteUtr(IInterval codingRegion, ITranscriptRegion exon, IRequiredFields requiredFields,
                       IGeneralAttributes attribs)
 {
     if (!GffUtilities.HasUtr(codingRegion, exon))
     {
         return;
     }
     if (exon.Start < codingRegion.Start)
     {
         Write5PrimeUtr(codingRegion, exon, requiredFields, attribs);
     }
     if (exon.End > codingRegion.End)
     {
         Write3PrimeUtr(codingRegion, exon, requiredFields, attribs);
     }
 }
Ejemplo n.º 6
0
 private void WriteTranscript(IInterval interval, IRequiredFields requiredFields, IGeneralAttributes attribs) =>
 _writer.WriteTranscript(interval, requiredFields, attribs);