Skip to content

Instantly share code, notes, and snippets.

View antunderwood's full-sized avatar

Anthony Underwood antunderwood

View GitHub Profile
@antunderwood
antunderwood / ast_genes.Rmd
Created September 12, 2020 09:07
Code to plot stacked charts for AST and AMR loci
---
title: "Plotting stacked AST/AMR data"
output: html_notebook
---
Read in some data. I've used JSON so I can have the data in this text file
```{r message=FALSE, warning=FALSE}
library(jsonlite)
ast_gene_json <- '[
{
@antunderwood
antunderwood / sample.csv
Created August 5, 2020 07:46
Sample of MIC data
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 55 columns, instead of 18 in line 5.
mo,AMC,AMK,AMP,ATM,AZM,CAZ,CEC,CEP,CFM,CHL,CIP,CLI,COL,CRO,CSL,CTX,CXA,CXM,CZO,DAP,DOR,ENR,ERY,ETP,FEP,FOX,GEN,IPM,LNZ,LVX,MEM,MET,MFX,NAL,NIT,NOR,OFX,OXA,PEN,PIP,RIF,SAM,SPT,STR,SXT,TCC,TCY,TEC,TGC,TIC,TOB,TZD,TZP,VAN
B_ACNTB_BMNN,NA,NA,NA,NA,NA,>=64,NA,NA,NA,NA,>=4,NA,NA,>=64,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,>=64,NA,>=16,>=16,NA,>=8,>32,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,>=32,NA,NA,16,NA,NA,NA,NA,NA,>=16,NA,NA,NA
B_ACNTB_BMNN,NA,NA,NA,NA,NA,>=64,NA,NA,NA,NA,>=4,NA,NA,>=64,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,>=64,NA,>=16,>=16,NA,2,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,>=32,NA,NA,16,NA,>=16,NA,NA,NA,8,NA,NA,NA
B_ACNTB_BMNN,NA,NA,NA,NA,NA,>16,NA,NA,NA,NA,>2,NA,<=1,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,>16,NA,>8,>8,NA,NA,>8,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,>2,NA,NA,NA,NA,NA,NA,NA,>64,NA
B_ACNTB_BMNN,NA,NA,NA,NA,NA,>16,NA,NA,NA,NA,>2,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,>16,NA,NA,>8,NA,NA,>8,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,>2,NA,NA,NA,NA,NA,NA,NA,>64,NA
B_ESCHR_COLI,4,NA,>=32,NA,NA,16,NA,NA,NA,NA,>=4,NA,NA,>=64,NA,NA,>=6
We can't make this file beautiful and searchable because it's too large.
id,sample_date,epi_week,country,adm1,submission_org_code,lineage,lineage_support,uk_lineage,primary_uk_lineage,d614g,year,month,day,lineage__colour,submission_org_code__colour,latitude,longitude,primary_uk_lineage__colour,d614g__colour
COG890794,2020-06-23,26.0,UK,UK-ENG,NORW,B.3,96.0,UK61,UK61,D,2020,6,23,#a52869,#3d46a8,52.6667,1,#e03da9,green
COG387849,2020-07-03,27.0,UK,UK-SCT,GLAS,B.1.1.1,98.0,UK5,UK5,G,2020,7,3,#b54946,#5bcd5a,55.0833,-3.8333,#60e54a,red
COG443892,2020-06-30,27.0,UK,UK-SCT,GLAS,B.1.1.1,96.0,UK5,UK5,G,2020,6,30,#b54946,#5bcd5a,55.0833,-3.8333,#60e54a,red
COG903586,2020-06-26,26.0,UK,UK-SCT,GLAS,B.1.1.1,98.0,UK5,UK5,G,2020,6,26,#b54946,#5bcd5a,55.0833,-3.8333,#60e54a,red
COG776962,2020-07-03,27.0,UK,UK-SCT,GLAS,B.1.1.1,99.0,UK5,UK5,G,2020,7,3,#b54946,#5bcd5a,55.0833,-3.8333,#60e54a,red
COG745909,2020-06-27,26.0,UK,UK-SCT,GLAS,B.1.1.1,99.0,UK5,UK5,G,2020,6,27,#b54946,#5bcd5a,55.0833,-3.8333,#60e54a,red
COG713306,2020-07-03,27.0,UK,UK-SCT,GLAS,B.1.1.1,98.0,UK5,UK5,G,2020,7,3,#b54946,#5bcd5a
------------------------------------------------------------
Sender: LSF System <lsfadmin@bc-28-1-11>
Subject: Job 590874: <nf-merge_reads_(G18001164)> in cluster <farm5> Done
Job <nf-merge_reads_(G18001164)> was submitted from host <node-10-3-1> by user <sa15> in cluster <farm5> at Fri Feb 14 09:21:21 2020
Job was executed on host(s) <bc-28-1-11>, in queue <normal>, as user <sa15> in cluster <farm5> at Fri Feb 14 09:21:22 2020
</nfs/users/nfs_s/sa15> was used as the home directory.
</lustre/scratch118/infgen/team212/cgps/ghru/retrospective_1/colombia_5606/batches/2020-02-12/work/3f/9c6cc818974bb6eb0a475e640aee94> was used as the working directory.
Started at Fri Feb 14 09:21:22 2020
Terminated at Fri Feb 14 09:21:23 2020
This file has been truncated, but you can view the full file.
Feb-14 09:18:13.792 [main] DEBUG nextflow.cli.Launcher - Setting HTTP proxy: [wwwcache.sanger.ac.uk, 3128]
Feb-14 09:18:13.880 [main] DEBUG nextflow.cli.Launcher - Setting HTTPS proxy: [wwwcache.sanger.ac.uk, 3128]
Feb-14 09:18:13.881 [main] DEBUG nextflow.cli.Launcher - $> nextflow run /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.5.4/assembly.nf --adapter_file /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.5.4/adapters.fas --qc_conditions /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.5.4/qc_conditions_nextera_relaxed.yml --input_dir /lustre/scratch118/infgen/team212/cgps/ghru/retrospective_1/colombia_5606/batches/2020-02-12/fastqs --fastq_pattern '*{R,_}{1,2}.f*q.gz' --output_dir /lustre/scratch118/infgen/team212/cgps/ghru/retrospective_1/colombia_5606/batches/2020-02-12/assembly_output --confindr_db_path /lustre/scratch118/infgen/team212/au3/software/confindr/confindr_database --depth_cutoff 100 --careful -w /lustre/scratch118/infgen/team212/

Keybase proof

I hereby claim:

  • I am antunderwood on github.
  • I am antunderwood (https://keybase.io/antunderwood) on keybase.
  • I have a public key ASB0IDndSxdBiINT41Hx4Jbp3QYS5ASVZDLeTRAorh6eXwo

To claim this, I am signing this object:

This file has been truncated, but you can view the full file.
Nov-22 10:05:36.122 [main] DEBUG nextflow.cli.Launcher - Setting HTTP proxy: [wwwcache.sanger.ac.uk, 3128]
Nov-22 10:05:36.333 [main] DEBUG nextflow.cli.Launcher - Setting HTTPS proxy: [wwwcache.sanger.ac.uk, 3128]
Nov-22 10:05:36.334 [main] DEBUG nextflow.cli.Launcher - $> nextflow run /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.5.0/assembly.nf --adapter_file /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.5.0/adapters.fas --qc_conditions /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.5.0/qc_conditions_nextera_relaxed.yml --input_dir /lustre/scratch118/infgen/team212/au3/ghru_retrospective/philippines_5603/12_11_2019/fastqs --fastq_pattern '*{R,_}{1,2}.f*q.gz' --output_dir /lustre/scratch118/infgen/team212/au3/ghru_retrospective/philippines_5603/12_11_2019/assembly_1.5.0_output --confindr_db_path /lustre/scratch118/infgen/team212/au3/software/confindr/confindr_database --depth_cutoff 100 -profile sanger -qs 500 -resume
Nov-22 10:05:36.507 [main
This file has been truncated, but you can view the full file.
Nov-20 23:37:22.450 [main] DEBUG nextflow.cli.Launcher - Setting HTTP proxy: [wwwcache.sanger.ac.uk, 3128]
Nov-20 23:37:24.167 [main] DEBUG nextflow.cli.Launcher - Setting HTTPS proxy: [wwwcache.sanger.ac.uk, 3128]
Nov-20 23:37:24.168 [main] DEBUG nextflow.cli.Launcher - $> nextflow run /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.4.4/assembly.nf --adapter_file /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.4.4/adapters.fas --qc_conditions /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.4.4/qc_conditions_nextera_relaxed.yml --input_dir /lustre/scratch118/infgen/team212/au3/ghru_retrospective/philippines_5603/12_11_2019/fastqs --fastq_pattern '*{R,_}{1,2}.f*q.gz' --output_dir /lustre/scratch118/infgen/team212/au3/ghru_retrospective/philippines_5603/12_11_2019/assembly_1.4.4-dev_output-on_farm5 --confindr_db_path /lustre/scratch118/infgen/team212/au3/software/confindr/confindr_database --depth_cutoff 100 -profile sanger -resume
Nov-20 23:37:30.373
Nov-18 11:07:56.381 [main] DEBUG nextflow.cli.Launcher - Setting HTTP proxy: [wwwcache.sanger.ac.uk, 3128]
Nov-18 11:07:59.014 [main] DEBUG nextflow.cli.Launcher - Setting HTTPS proxy: [wwwcache.sanger.ac.uk, 3128]
Nov-18 11:07:59.018 [main] DEBUG nextflow.cli.Launcher - $> nextflow run /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.4.4/assembly.nf --adapter_file /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.4.4/adapters.fas --qc_conditions /lustre/scratch118/infgen/team212/au3/nextflow_workflows/assembly-1.4.4/qc_conditions_nextera_relaxed.yml --input_dir /lustre/scratch118/infgen/team212/au3/ghru_retrospective/philippines_5603/12_11_2019/fastqs --fastq_pattern '*{R,_}{1,2}.f*q.gz' --output_dir /lustre/scratch118/infgen/team212/au3/ghru_retrospective/philippines_5603/12_11_2019/assembly_1.4.4-dev_output-on_farm5 --confindr_db_path /lustre/scratch118/infgen/team212/au3/software/confindr/confindr_database --depth_cutoff 100 -profile sanger -qs 500 -resume
Nov-18 11:08
@antunderwood
antunderwood / SKA experimentation using Random ref sequence
Last active April 23, 2019 19:33
SKA experimentation using Random ref sequence
Description