Fasta

NAME

Fasta - Library of FASTA related functionality

SYNOPSIS


use Fasta;

my %counts = Fasta.count-bases($file);
say %counts{"Carsonella ruddii"};     # bag with frequencies

my %sequences = Fasta.sequences($file);
say %sequences{"Carsonella ruddii"};  # sequence as string

DESCRIPTION

A library for Fasta processing related logic.

count-bases


my %labels = Fasta.count-bases($file);
say %label{"Carsonella ruddii"};  # bag with frequencies

Takes the name of a Fasta file, and creates a hash with labels encountered as keys, and a Bag with the nucleotide letters and their frequencies.

sequences


my %sequences = Fasta.sequences($file);
say %sequences{"Carsonella ruddii"};  # sequence as string

Takes the name of a Fasta file, and creates a hash with labels encountered as keys, and a string with the actual sequence.

INSPIRATION

Inspired by the Suman Khanal's:

https://sumankhanal.netlify.app/post/raku/count_dna/

AUTHOR

Elizabeth Mattijsen <[email protected]>

Source can be located at: https://github.com/lizmat/Fasta . Comments and Pull Requests are welcome.

If you like this module, or what I’m doing more generally, committing to a small sponsorship would mean a great deal to me!

COPYRIGHT AND LICENSE

Copyright 2020, 2021, 2024, 2025 Elizabeth Mattijsen

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

# vim: expandtab shiftwidth=4

Fasta v0.0.6

Library of FASTA related functionality

Authors

  • Elizabeth Mattijsen

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • Fasta

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.