Functions:
# encoding: ACTG
def nuc2int_nochecking(b):
return (ord(b) >> 1) & 3, True
def nuc2int_if(b):
if b == 'a' or b == 'c' or b == 'g' or b == 't' \
or b == 'A' or b == 'C' or b == 'G' or b == 'T':
Functions:
# encoding: ACTG
def nuc2int_nochecking(b):
return (ord(b) >> 1) & 3, True
def nuc2int_if(b):
if b == 'a' or b == 'c' or b == 'g' or b == 't' \
or b == 'A' or b == 'C' or b == 'G' or b == 'T':
#Example 1: | |
#!/usr/bin/env nextflow | |
params.str = 'Hello world!' | |
process AFcalc { | |
""" | |
echo '${params.str}' |
#include <sys/mman.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <cuda_runtime.h> | |
#include <cerrno> | |
#include <cstring> | |
#include <memory> | |
#include <stdexcept> |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <htslib/sam.h> | |
int main(int argc, char *argv[]){ | |
samFile *fp_in = hts_open(argv[1],"r"); //open bam file | |
bam_hdr_t *bamHdr = sam_hdr_read(fp_in); //read header | |
bam1_t *aln = bam_init1(); //initialize an alignment |
Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.
chmod a+x vcfsort.sh | |
vcfsort.sh trio.trim.vep.vcf.gz |
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive |
library(vcfR) | |
# Import VCF | |
my.vcf <- read.vcfR('my.vcf.gz') | |
# Combine CHROM thru FILTER cols + INFO cols | |
my.vcf.df <- cbind(as.data.frame(getFIX(my.vcf)), INFO2df(my.vcf)) |