Skip to content

Instantly share code, notes, and snippets.

@MattOates
Last active January 12, 2017 13:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattOates/60c9a600f6f17cfe2158 to your computer and use it in GitHub Desktop.
Save MattOates/60c9a600f6f17cfe2158 to your computer and use it in GitHub Desktop.
New Rakudo REPL with slanged multiline quote constructor for arrays of bio-sequence objects. Example takes copy pasted FASTA formatted sequence data between ` ` and creates an array of sequence objects. Translated into amino acids we get the PERL peptide ;3 For the code that generates the slang please see https://github.com/MattOates/BioInfo/blo…
$ perl6 -MBioInfo
To exit type 'exit' or '^D'
> my @dna = `
* >id comment
* CCCGAACGGCTT
* `;
[>id comment
CCCGAACGGCTT
]
> @dna[0].translate
>id comment
PERL
> +@dna[0]
12
> @dna[0].six-frame-translate
[>id/+1 comment
PERL
>id/+2 comment
PNG
>id/+3 comment
RTA
>id/-1 comment
KPFG
>id/-2 comment
SRS
>id/-3 comment
AVR
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment