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
#!/usr/bin/env bash | |
set -eo pipefail | |
echo -n "Simulate random genome sequences..." | |
starttime="$(date +%s)" | |
nuclmm simulate --out helium-refr.fa --order 6 --numseqs 1 --seqlen 2500000 --seed 8013785666 human.order6.mm | |
nuclmm simulate --out neon-refr.fa --order 6 --numseqs 1 --seqlen 25000000 --seed 7066509186 human.order6.mm | |
nuclmm simulate --out argon-refr.fa --order 6 --numseqs 1 --seqlen 250000000 --seed 3015700578 human.order6.mm | |
gzip -f {helium,neon,argon}-refr.fa | |
elapsed="$(($(date +%s)-starttime))" |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import glob | |
import os | |
m4a_files = glob.glob('*/*/*.m4a') | |
mp3_files = glob.glob('*/*/*.mp3') | |
to_delete = list() | |
for m4a in m4a_files: |
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
import argparse | |
import khmer | |
import pandas | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--counts', nargs='+') | |
parser.add_argument('--samples', nargs='+') | |
parser.add_argument('window', nargs='+') | |
args = parser.parse_args() |
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
from __future__ import print_function | |
from collections import defaultdict | |
import argparse | |
import khmer | |
import statistics | |
import sys | |
import time | |
allocators = { | |
'ct': khmer.Counttable, |
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
class: CommandLineTool | |
doc: BwaMem | |
id: bwa-mem-0.7.15 | |
label: "bwa mem v0.7.5" | |
cwlVersion: v1.0 | |
dct:creator: | |
"@id": "http://orcid.org/0000-0003-0342-8531" | |
foaf:name: Daniel Standage |
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
template<typename HasherType, typename StorageType> | |
class Sketch | |
{ | |
protected: | |
StorageType storage; | |
public: | |
Sketch(size_t Wordsize, size_t table_size, size_t num_tables = 4); | |
add(std::string& kmer); | |
get(std::string& kmer); |
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
# 1. Dump reads that match reference genome perfecly | |
kevlar dump GRCh38_full_analysis_set_plus_decoy_hla.fa NA91238.bam | gzip -c > NA19238.dump.fq.gz | |
kevlar dump GRCh38_full_analysis_set_plus_decoy_hla.fa NA91239.bam | gzip -c > NA19239.dump.fq.gz | |
kevlar dump GRCh38_full_analysis_set_plus_decoy_hla.fa NA91240.bam | gzip -c > NA19240.dump.fq.gz | |
# 2. Count k-mers, find interesting k-mers, print out corresponding reads | |
## Option a: the old way | |
kevlar novel \ |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import argparse | |
import tag | |
#------------------------------------------------------------------------------ | |
# Declare the command-line interface: | |
# how the user specifies input files and adjusts settings | |
#------------------------------------------------------------------------------ |
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
>ERR899711.82875865/2 | |
CGGGGTTTCCCCGTGTTAGCCAGGATGGTCTCGATCTCCTGACCTCGTGATCCGCCCGCCTCGGCCTCCCAAAGTGCTGGGATTACAGGCGTGAGCCACCGCGCCCGGCCATATATGTTTTTAAGA | |
>ERR899711.228335376/1 | |
CGTGTTAGCCAGGATGGTCTCGATCTCCTGACCTCGTGATCCGCCCGCCTCGGCCTCCCAAAGTGCTGGGATTACAGGCGTGAGCCACCGCGCCCGGCCATATATGTTTTTAAGAAAACTTTTTTT | |
>ERR894724.61176304/2 | |
GCCAGGATGGTCTCGATCTCCTGACCTCGTGATCCGCCCGCCTCGGCCTCCCAAAGTGCTGGGATTACAGGCGTGAGCCACCGCGCCCGGCCATATATGTTTTTAAGAAAACTTTTTTTGGATGCC | |
>ERR899711.203563977/2 | |
CCAGGATGGTCTCGATCTCCTGACCTCGTGATCCGCCCGCCTCGGCCTCCCAAAGTGCTGGGATTACAGGCGTGAGCCACCGCGCCCGGCCATATATGTTTTTAAGAAAACTTTCTTTGGATGCCC | |
>ERR899709.43552857/1 | |
GATCTCCTGACCTCGTGATCCGCCCGCCTCGGCCTCCCAAAGTGCTGGGATTACAGGCGTGAGCCACCGCGCCCGGCCATATATGTTTTTAAGAAAACTTTTTTTGGATGCCCAGGCCGACAGATC |
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
for i in 2 7 8 | |
do | |
fastq-dump --split-files --defline-seq '@$ac.$si.$sg/$ri' --defline-qual '+' -Z --gzip SRR03025${i} \ | |
> SRR03025${i}.fq.gz | |
done | |
for i in 2 7 8 | |
do | |
trim-low-abund.py -k 17 -M 250M --variable-coverage -o SRR03025${i}.trim.fq.gz --gzip SRR03025${i}.fq.gz \ | |
2> SRR03025{}.trim.log & |