Skip to content

Instantly share code, notes, and snippets.

@aunderwo
aunderwo / tree.nwk
Created Jun 14, 2021
COG-UK SARS-CoV-2 tree 2021-06-14
View tree.nwk
This file has been truncated, but you can view the full file.
View colours.csv
id colour
1127 #696969
8081 #fd125b
2/C/53/NMD7 #0fc060
209-36/84 #a65651
E701 #c0135c
E736 #a65651
ERL022789 #ab2e94
ERL023784 #696969
ERL032126 #efe900
View graph.json
This file has been truncated, but you can view the full file.
{
"directed": true,
"graph": {},
"links": [
{
"coverage": 1.0,
"identity": 0.997,
"source": "card:ARO:3000005",
"target": "ncbi:WP_063856692.1",
View variants_wide.csv
Sample D614G N439K P323I A222V Y453F
1 D N P A F
2 D N P A F
3 D K I A Y
4 G N I V Y
5 G K P V F
View silvia_mock_data.csv
Sample position nt
Reference 8782 T
Reference 13066 T
Reference 17858 A
Reference 18060 C
Reference 23403 A
ARG_1 8782 C
ARG_1 13066 T
ARG_1 17858 G
ARG_1 18060 C
View variants.csv
Sample variant allele
1 D614G D
1 N439K N
1 P323I P
1 A222V A
1 Y453F F
2 D614G D
2 N439K N
2 P323I P
2 A222V A
@aunderwo
aunderwo / MICs.tsv
Created Oct 3, 2020
Concordance dataset
View MICs.tsv
We can't make this file beautiful and searchable because it's too large.
ROW_IDX COUNTRY_A LABORATORY ORIGIN PATIENT_ID LAST_NAME FIRST_NAME SEX DATE_BIRTH AGE PAT_TYPE WARD INSTITUT DEPARTMENT WARD_TYPE DATE_ADMIS SPEC_NUM SPEC_DATE SPEC_TYPE LOCAL_SPEC SPEC_CODE SPEC_REAS ISOL_NUM ORGANISM LOCAL_ORG ORG_TYPE SEROTYPE MRSA VRE BETA_LACT ESBL CARBAPENEM MRSA_SCRN INDUC_CLI COMMENT DATE_DATA AMC_NM AMK_NM AMP_NM ATM_NM AZM_NM CAZ_NM CEP_NM CFM_NM CHL_NM CIP_NM CLI_NM COL_NM COP_NM CRO_NM CSL_NM CTX_NM CXA_NM CXM_NM CZO_NM DAP_NM DOR_NM ENR_NM ERY_NM ETP_NM FEP_NM FOX_NM GEN_NM IPM_NM LNZ_NM LVX_NM MAN_NM MEM_NM MFX_NM MNO_NM NAL_NM NOR_NM NTZ_NM OFX_NM OXA_NM PEN_NM PIP_NM QDA_NM RIF_NM SAM_NM SPT_NM STR_NM SXT_NM TCC_NM TCY_NM TEC_NM TGC_NM TOB_NM TZP_NM VAN_NM
0.00000 COL RET G18000002 RB 141 eco eco - 2020-09-30 16 16 >2 <=0.5 >32 <=0.12 <=0.5 8 16 >8 <=0.25 <=0.25 >16 <=0.5 8
@aunderwo
aunderwo / ast_genes.Rmd
Created Sep 12, 2020
Code to plot stacked charts for AST and AMR loci
View ast_genes.Rmd
---
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 <- '[
{
@aunderwo
aunderwo / sample.csv
Created Aug 5, 2020
Sample of MIC data
View sample.csv
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
View covid_data.csv
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