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
| import argparse as ap | |
| import sys | |
| import vcf | |
| import yaml | |
| VERSION = 0.1 | |
| def filter_variants(yaml_variants): | |
| variants = [] |
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
| root@6cc3ac9c89c3:/# dpkg -i --ignore-depends=libboost-log1.58.0 ont_guppy_2.3.7-1~xenial_amd64.deb | |
| (Reading database ... 15231 files and directories currently installed.) | |
| Preparing to unpack ont_guppy_2.3.7-1~xenial_amd64.deb ... | |
| Unpacking ont-guppy (2.3.7-1~xenial) over (2.3.7-1~xenial) ... | |
| dpkg: dependency problems prevent configuration of ont-guppy: | |
| ont-guppy depends on libcurl4-openssl-dev; however: | |
| Package libcurl4-openssl-dev is not installed. | |
| ont-guppy depends on libssl-dev; however: | |
| Package libssl-dev is not installed. |
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
| in bwa/bwamem.c reduce chunk_size to a smaller value otherwise it will not return for ages: | |
| o->chunk_size = 10000; | |
| import subprocess | |
| import select | |
| p = subprocess.Popen(['bin/bwa/bwa', 'mem', 'ref/NC_018143.fna', '/dev/stdin'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) |
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
| tar -cf - $dir | tee >(ncftpput -v -F -u USER -p PASS -c HOST ${dir}.tar) | md5sum > ${dir}.md5 |
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
| touch a.fasta | |
| touch b.fasta | |
| touch c.fasta | |
| find . -name "*.fasta" | parallel echo union -sequence {} -sformat fasta -outseq {}.union.fasta -osformat fasta -auto | |
| find . -name "*.fasta" | xargs -L 1 -I '{}' echo union -sequence {} -sformat fasta -outseq {}.union.fasta -osformat fasta -auto |
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
| import pysam | |
| import sys | |
| samfile = pysam.Samfile(sys.argv[1], "rb") | |
| fields = ['Name', 'QueryLen', 'AlignLen', 'NumMismatches'] | |
| print "\t".join(fields) | |
| for read in samfile: | |
| t = dict(read.tags) |
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
| import h5py | |
| from Bio import SeqIO | |
| from StringIO import StringIO | |
| import sys | |
| keys = {'template' : '/Analyses/Basecall_2D_000/BaseCalled_template/Fastq', | |
| 'complement' : '/Analyses/Basecall_2D_000/BaseCalled_complement/Fastq', | |
| 'twodirections' : '/Analyses/Basecall_2D_000/BaseCalled_2D/Fastq'} | |
| for fn in sys.argv[1:]: |
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
| require 'formula' | |
| class Hdf5 < Formula | |
| homepage 'http://www.hdfgroup.org/HDF5' | |
| url 'http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.12/src/hdf5-1.8.12.tar.bz2' | |
| sha1 '8414ca0e6ff7d08e423955960d641ec5f309a55f' | |
| version '1.8.12' | |
| # TODO - warn that these options conflict | |
| option :universal |
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
| import sys | |
| from collections import defaultdict | |
| from itertools import izip_longest | |
| def grouper(n, iterable, fillvalue=None): | |
| args = [iter(iterable)] * n | |
| return izip_longest(fillvalue=fillvalue, *args) | |
| contigs = defaultdict(dict) |
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
| #Usage: | |
| #blastall -p blastn -d db -i query -m 8 | python pullblast.py db.fasta | |
| import sys | |
| from Bio import SeqIO | |
| records = SeqIO.to_dict(SeqIO.parse(open(sys.argv[1]), "fasta")) | |
| for ln in sys.stdin: | |
| cols = ln.rstrip().split("\t") |
NewerOlder