| 32 | } |
| 33 | |
| 34 | static const char* zcatExec(const string& path) |
| 35 | { |
| 36 | return |
| 37 | endsWith(path, ".ar") ? "ar -p" : |
| 38 | endsWith(path, ".tar") ? "tar -xOf" : |
| 39 | endsWith(path, ".tar.Z") ? "tar -zxOf" : |
| 40 | endsWith(path, ".tar.gz") ? "tar -zxOf" : |
| 41 | endsWith(path, ".tar.bz2") ? "tar -jxOf" : |
| 42 | endsWith(path, ".tar.xz") ? |
| 43 | "tar --use-compress-program=xzdec -xOf" : |
| 44 | endsWith(path, ".Z") ? "gunzip -c" : |
| 45 | endsWith(path, ".gz") ? "gunzip -c" : |
| 46 | endsWith(path, ".bz2") ? "bunzip2 -c" : |
| 47 | endsWith(path, ".xz") ? "xzdec -c" : |
| 48 | endsWith(path, ".zip") ? "unzip -p" : |
| 49 | endsWith(path, ".bam") ? "samtools view -h" : |
| 50 | endsWith(path, ".cram") ? "samtools view -h" : |
| 51 | endsWith(path, ".jf") ? "jellyfish dump" : |
| 52 | endsWith(path, ".jfq") ? "jellyfish qdump" : |
| 53 | endsWith(path, ".sra") ? "fastq-dump -Z --split-spot" : |
| 54 | endsWith(path, ".url") ? "wget -O- -i" : |
| 55 | endsWith(path, ".fqz") ? "fqz_comp -d" : |
| 56 | NULL; |
| 57 | } |
| 58 | |
| 59 | extern "C" { |
| 60 |
no test coverage detected