This notebook is for visualizing antibiotic resistance gene tables generated by ABRicate and SRST2.
In this example, the complete Shakya et al. 2013 metagenome is being compared to small, medium, and large subsamples of itself after conservative or aggressive read filtering and assembly with SPAdes or MEGAHIT. The datasets used in this example are named according to their metagenome content, relative degree of read filtering, and assembler used where appropriate. SRST2 is appropriate for analysis of antibiotic resistance genes (ARG) in reads while is ABRicate is useful for analysis of ABR in contigs.
In [1]:
from antibiotic_res import *
In [23]:
concat_abricate_files('*tab').to_csv('concatenated_abricate_results.txt')
In [3]:
calc_total_genes_abricate()
Out[3]:
In [4]:
calculate_unique_genes_abricate()
Out[4]:
In [5]:
create_abricate_presence_absence_gene_table()
Out[5]:
In [6]:
np.version.version
Out[6]:
In [7]:
interactive_map_abricate()
In [8]:
interactive_table_abricate()
In [24]:
df = pd.read_csv('concatenated_abricate_results.csv')
qgrid.show_grid(df, show_toolbar=True)
In [9]:
concat_srst2_txt("srst2/*results.txt")
Out[9]:
In [15]:
calc_total_genes_srst2()#.to_csv('')
In [11]:
calculate_unique_genes_srst2()#.to_csv('')
Out[11]:
In [12]:
create_srst2_presence_absence_gene_table()
Out[12]:
In [13]:
interactive_map_srst2()
In [14]:
interactive_table_srst2()
We analyzed and compared predicted antibiotic resistance genes (ABRs) in reads and contigs. To determine whether quality filtering and sequencing depth affected detection of ABRs we compared light and agressive trimming. A greater number of genes were detected with following assembly. Three genes, vat(F), tet(O), and blaTEM-116 4, were only detected in the SPAdes assembly.