args <- data.table::fread('../data/ARGs/ARG_database.fa', header = FALSE, col.names = "Target ARGs")
primer_info <- data.table::fread('../data/primers/DARTE-QM_primer_design.csv', header = TRUE)
fprimers <- data.table::fread('../data/primers/forward_primers', header = FALSE, col.names = "Forward Primers")
rprimers <- data.table::fread('../data/primers/reverse_primers', header = FALSE, col.names = "Reverse Primers")
classifications <- unique(data.table::fread('../data/ARGs/target_ARG_classifications.tsv', header = TRUE))
mock_genomes <- data.table::fread('../data/mock/mock_genomes_and_plasmids.fa', header = FALSE, col.names = "Mock Community Members")
mock_genome_names <- unname(unlist(ssBLAST:::fasta_seq_names("../data/mock/mock_genomes_and_plasmids.fa")))
metadata <- data.table::fread('../data/samples/sample_metadata.csv')
metadata[['ID']] <- gsub('Q3_', '', metadata[['ID']])
metadata[['ID']] <- gsub('_', '-', metadata[['ID']])
data.table::set(metadata, j = 'Sample', value = factor(metadata[['Sample']], levels = unique(metadata[['Sample']])))
data.table::set(metadata, j = 'Matrix', value = factor(metadata[['Matrix']], levels = unique(metadata[['Matrix']])))
sc_i <- read_counts[Gene != "16S",c(1,2,3,grep('SCI-', colnames(read_counts))), with=FALSE]
FASTQ files for all data analyze for this study can be found at …
soil_column_I_ARGS <- readRDS('../data/samples/soil_column_I_ARGs.RDS')
SC_I <- phylosmith::melt_phyloseq(soil_column_I_ARGS)
SC_I <- SC_I[Sample %in% SC_I[,sum(Abundance), by = c('Sample')]$Sample[SC_I[,sum(Abundance), by = c('Sample')]$V1 > 1000]]
SC_I <- SC_I[, sum(Abundance), by = c('Sample', 'Gene', 'Treatment', 'Matrix', 'Day')]
data.table::set(SC_I, j = 'Gene', value = tolower((SC_I[['Gene']])))
SC_I[, ARG_Family := tolower(substr(SC_I[['Gene']],1,3))]
data.table::set(SC_I, j = 'Matrix', value = tolower(SC_I[['Matrix']]))
data.table::set(SC_I, which(SC_I[['Matrix']]=='soil' & SC_I[['Day']]==0), j='Matrix', value='Soil A')
data.table::set(SC_I, which(SC_I[['Matrix']]=='soil' & SC_I[['Day']]!=0), j='Matrix', value='Manure-Soil A')
SC_I$Sample <- factor(SC_I$Sample, levels = unique(SC_I$Sample[order(as.numeric(SC_I$Day))]))
data.table::setnames(SC_I, 'Gene', 'ARG')
Schuyler Smith
Ph.D. Student - Bioinformatics and Computational Biology
Iowa State University. Ames, IA.