%load_ext rpy2.ipython directory='/mnt/borage/nick/nanopore/data/Flowcell6/downloads' !find $directory -maxdepth 1 -name "*.fast5" | wc -l !poretools !poretools -h !poretools stats -q $directory !poretools stats -q --type fwd $directory !poretools stats -q --type rev $directory !poretools stats -q --type 2D $directory !poretools readstats -q $directory > readstats.txt !wc -l readstats.txt !head -10 readstats.txt %R stats=read.table("readstats.txt", sep="\t") %R stats=subset(stats, V4 < 20000 & V5 < 20000) %R smoothScatter(stats$V4,stats$V5) !poretools winner -q --type 2D $directory > winner.fasta !head -1 winner.fasta | sed 's/>.* //' | xargs poretools squiggle --saveas png --num-facets 12 squiggle=!head -1 winner.fasta | sed 's/>.* //' squiggle=squiggle[0] + '.png' Image(squiggle) !poretools yield_plot -q --theme-bw --saveas yield_plot.png --plot-type reads $directory !poretools yield_plot -q --theme-bw --saveas yield_plot.pdf --plot-type reads $directory Image("yield_plot.png") !poretools hist -q --theme-bw --min-length 1000 --max-length 40000 --saveas hist.png $directory !poretools hist -q --theme-bw --min-length 1000 --max-length 40000 --saveas hist.pdf $directory Image("hist.png") !poretools nucdist -q $directory !poretools qualdist -q $directory