pub fn extract_gene(&self, full_aln_seq: &[Nuc], gene: &Gene) -> Vec<Nuc> {
    let &Gene { start, end, .. } = gene;

    // Gene map contains gene range in reference coordinates (like in ref sequence)
    let gene_range_ref = Range { begin: start, end };

    // ...but we are extracting from aligned sequence, so we need to convert it to alignment coordinates (like in aligned sequences)
    let gene_range_aln = self.ref_to_aln_range(&gene_range_ref);
    let mut gene_nucs = full_aln_seq[StdRange::from(gene_range_aln)].to_vec();

    // Reverse strands should be reverse-complemented
    if gene.strand == GeneStrand::Reverse {
      reverse_complement_in_place(&mut gene_nucs);
    }

    gene_nucs
  }
/// Extracts nucleotide sequence of a gene
Extracts nucleotide sequence of a gene
Extracts nucleotide sequence of a gene
pub fn extract_gene(&self, full_aln_seq: &[Nuc], gene: &Gene) -> Vec<Nuc> {
    let &Gene { start, end, .. } = gene;
    // Gene map contains gene range in reference coordinates (like in ref sequence)
    let gene_range_ref = Range { begin: start, end };
    // ...but we are extracting from aligned sequence, so we need to convert it to alignment coordinates (like in aligned sequences)
    let gene_range_aln = self.ref_to_aln_range(&gene_range_ref);
    let mut gene_nucs = full_aln_seq[StdRange::from(gene_range_aln)].to_vec();
    // Reverse strands should be reverse-complemented
    if gene.strand == GeneStrand::Reverse {
      reverse_complement_in_place(&mut gene_nucs);
    }
    gene_nucs
  }
pub fn extract_gene ( & self , full_aln_seq : & [ Nuc ] , gene : & Gene ) -> Vec < Nuc > { let & Gene { start , end , .. } = gene ; // Gene map contains gene range in reference coordinates (like in ref sequence) let gene_range_ref = Range { begin : start , end } ; // ...but we are extracting from aligned sequence, so we need to convert it to alignment coordinates (like in aligned sequences) let gene_range_aln = self . ref_to_aln_range ( & gene_range_ref ) ; let mut gene_nucs = full_aln_seq [ StdRange :: from ( gene_range_aln ) ] . to_vec ( ) ; // Reverse strands should be reverse-complemented if gene . strand == GeneStrand :: Reverse { reverse_complement_in_place ( & mut gene_nucs ) ; } gene_nucs }
Extracts nucleotide sequence of a gene
Extracts nucleotide sequence of a gene
&self
full_aln_seq
&[Nuc]
gene
&Gene
&self
full_aln_seq
&[Nuc]
gene
&Gene