Skip to content

Instantly share code, notes, and snippets.

View Psy-Fer's full-sized avatar
🌈
Winning

James Ferguson Psy-Fer

🌈
Winning
View GitHub Profile
# where $1 is the sample name. eg sample-0112, for naming scheme sample-0112_merged.bam, etc.
samtools mpileup \
-f nCoV-2019.reference.fasta \
--max-depth 1000 \
--positions nCoV-2019.reportable_region.bed \
${1}_merged.bam -o ${1}_merged.mpileup
java -jar VarScan.v2.4.3.jar mpileup2snp \
@Psy-Fer
Psy-Fer / reorgcirc.py
Last active May 3, 2021 09:20
re-organise circular assembly using given search sequence
import os
import sys
import argparse
import edlib
'''
James M. Ferguson ([email protected])
Genomic Technologies
Garvan Institute
Copyright 2021
@Psy-Fer
Psy-Fer / fastq_line_by_line.r
Created September 6, 2018 17:03
Quick example of reading a fastq file line by line in R
con <- file("test.fastq", "r")
c <- 0
while ( TRUE ) {
line = readLines(con, n = 1)
if( length(line) == 0 ) {
break
}
c <- c + 1
if(c == 1){
print(line)