Skip to content

Instantly share code, notes, and snippets.

@holtgrewe
Created October 4, 2014 12:05
Show Gist options
  • Save holtgrewe/7a65a98b5cbe9c719d0f to your computer and use it in GitHub Desktop.
Save holtgrewe/7a65a98b5cbe9c719d0f to your computer and use it in GitHub Desktop.
Files for Ticket #1105 on Trac
> ade fas df asdf asd f
POIQUWEOIRUQOIEWURPOQIWUERPOQIWUERPOIQUEWRPOIUEWQR
#include <seqan/basic.h>
#include <seqan/sequence.h>
#include <seqan/seq_io.h>
#include <seqan/arg_parse.h>
using namespace std ;
using namespace seqan ;
int main(int argc, char const ** argv)
{
if (argc < 2) {
cerr << "USAGE: basic_seq_io_example FILENAME\n";
return 1;
}
cerr << argv[0] << ": Reading! from " << argv[1] << endl ;
CharString id;
Dna5String seq;
SequenceStream seqStream(argv[1]);
if( ! isGood( seqStream ) ) {
cerr << "Cannot read file " << argv[0] << endl ;
return 1 ;
}
if( readRecord(id, seq, seqStream) != 0 ) {
cerr << "There was an error reading the sequence" << endl ;
} else {
cout << id << '\t' << seq << '\n';
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment