Skip to content
Snippets Groups Projects
Commit caaf42ea authored by Aaron's avatar Aaron
Browse files

tweaks to bamtofastq

parent 4ba5f455
No related branches found
No related tags found
No related merge requests found
......@@ -176,6 +176,8 @@ void BamToFastq::PairedFastqUseTags() {
// since the info for both ends are contained in each BAM record,
// we only need to process one of the two records (bam1) in order
// to produce FASTQ entries for both ends.
// NOTE: Assumes that R2 and Q2 have already been rev
// and revcomped if necessary
if (bam1.IsFirstMate() == true) {
// end1
fq1 << "@" << bam1.Name << "/1" << endl;
......
......@@ -30,26 +30,26 @@ class BamToFastq {
public:
// constructor
BamToFastq(string bamFile, string fastq1, string fastq2, bool useMateTags, bool pairedEnd);
// constructor
BamToFastq(string bamFile, string fastq1, string fastq2, bool useMateTags, bool pairedEnd);
// destructor
~BamToFastq(void);
// destructor
~BamToFastq(void);
private:
void SingleFastq();
void PairedFastq();
void PairedFastqUseTags();
void SingleFastq();
void PairedFastq();
void PairedFastqUseTags();
string _bamFile;
string _bamFile;
BamAlignment _end1;
BamAlignment _end2;
BamAlignment _end1;
BamAlignment _end2;
string _fastq1, _fastq2; // the names of the fastq output files
bool _useMateTags; // whether or not the mate sequence should be
// extracted from the R2 BAM tag.
string _fastq1, _fastq2; // the names of the fastq output files
bool _useMateTags; // whether or not the mate sequence should be
// extracted from the R2 BAM tag.
bool _pairedEnd;
};
......@@ -127,7 +127,8 @@ void bamtofastq_help(void) {
cerr << "Usage: " << PROGRAM_NAME << " [OPTIONS] -i <BAM> -fq <FQ> " << endl << endl;
cerr << "Options:" << endl;
cerr << "\t-fq2\tFASTQ for second end. Use if BAM contains paired-end data." << endl << endl;
cerr << "\t-fq2\tFASTQ for second end. Used if BAM contains paired-end data." << endl;
cerr << "\t\tBAM should be sorted by query name is creating paired FASTQ." << endl << endl;
cerr << "\t-tags\tCreate FASTQ based on the mate info" << endl;
cerr << "\t\tin the BAM R2 and Q2 tags." << endl << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment