Created
February 5, 2012 20:18
-
-
Save chadbrewbaker/1747759 to your computer and use it in GitHub Desktop.
FASTAQ sequence extractor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Simple fastaq sequence extractor | |
//Usage: fqextract.out FILEIN > FILEOUT | |
#include <iostream> | |
#include <string> | |
#include <fstream> | |
#include <cstdlib> | |
using namespace std; | |
int main(int argc,char **argv) | |
{ | |
string line; | |
ifstream in(argv[1],ios::in); | |
if(!in.is_open()) return EXIT_FAILURE; | |
while(getline(in,line,'\n')){ //name | |
getline(in,line,'\n'); //seq | |
std:cout << line << endl; | |
getline(in,line,'\n'); //name2 | |
getline(in,line,'\n'); //seq2 | |
} | |
in.close(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment