Skip to content

Add reverse-complement function #23

@maasha

Description

@maasha

Will require that we know the sequence type which must be either DNA or RNA.

Hint:

      if self.is_dna?
        entry.seq = self.seq.tr('AGCUTRYWSMKHDVBNagcutrywsmkhdvbn', 'TCGAAYRWSKMDHBVNtcgaayrwskmdhbvn')
      elsif self.is_rna?
        entry.seq = self.seq.tr('AGCUTRYWSMKHDVBNagcutrywsmkhdvbn', 'UCGAAYRWSKMDHBVNucgaayrwskmdhbvn')
      else
        raise SeqError, "Cannot complement sequence type: #{self.type}"
      end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions