Function
readFasta
Read first sequence from a FASTA file.
This function is meant for demo programs and allows to read the first sequence from a FASTA file very easily.
Include Headers
seqan/seq_io.h
Parameters
String to store the result. Types: String | |
Path to the file to read from. Types: |
Return Values
Examples
Read the file given by the first parameter to the program and print it to the screen.
#include <seqan/sequence.h>
#include <seqan/seq_io.h>
int main(int argc, char const ** argv)
{
if (argc != 2)
return 1;
seqan::Dna5String seq;
if (readFasta(seq, argv[1]) != 0)
return 1;
std::cout << seq << '\n';
return 0;
}
SeqAn - Sequence Analysis Library - www.seqan.de