This file contains hidden or 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
| //g++ -o readbgz readbgz.cc -lboost_iostreams -lz | |
| #include <boost/iostreams/filtering_stream.hpp> | |
| #include <boost/iostreams/device/file.hpp> | |
| #include <boost/iostreams/filter/gzip.hpp> | |
| #include <iostream> | |
| #include <fstream> | |
| #include <cstdlib> | |
| #include <vector> |
This file contains hidden or 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
| /* | |
| sizeof(iterator) and sizeof(pointer) are the same. | |
| They also act the same vis-a-vis dereferencing. | |
| But, they do not act the same with respect to traversal of a range | |
| Note that this example forces iterator and pointer invalidation to occur. | |
| Thus, the specifics of the output may vary with the optimization level | |
| used to compile. On OS X Mavericks, -O2 provides cleaner output |
This file contains hidden or 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
| #!sh | |
| #Must be executed with bash shell. | |
| #If sh bwapetrick1.sh fails, then say bash bwapetrick1.sh | |
| #bwa 0.7.5a-r405 | |
| #samtools 0.1.19 | |
| LEFTREADS=NY42_06_21_2010_54_1.fastq.gz | |
| RIGHTREADS=NY42_06_21_2010_54_2.fastq.gz |
This file contains hidden or 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
| /* | |
| Example of how to write binary stuff in C++ | |
| Illustrates some of the various quirks/annoyances | |
| */ | |
| #include <iostream> | |
| #include <fstream> | |
| #include <string> | |
| #include <vector> |
This file contains hidden or 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
| /* | |
| A function to check that a file both exists and is in .gz format. | |
| It is done the easy way, using only C++ constructs instead of any lower-level calls | |
| Requires the boost iostreams library | |
| Programs compiled using this function need -lboost_iostreams | |
| */ |
NewerOlder