Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mhenault1 authored Oct 13, 2022
1 parent 8e45404 commit 4218846
Show file tree
Hide file tree
Showing 5 changed files with 439 additions and 1,203 deletions.
10 changes: 5 additions & 5 deletions assembly_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@
"metadata": {},
"outputs": [],
"source": [
"fig = plt.figure(figsize=[10,10])\n",
"fig = plt.figure(figsize=[8,8])\n",
"gs = plt.GridSpec(ncols=2, nrows=2, left=0.15, right=0.96, bottom=0.15, top=0.94,\n",
" hspace=0.6, wspace=0.5)\n",
" hspace=0.6, wspace=0.6)\n",
"m_alias = {'snp_count':'single nucleotide variants',\n",
" 'indel_count': 'single nucleotide indels',\n",
" 'gap_count':'gaps',\n",
Expand All @@ -158,9 +158,9 @@
" sns.heatmap(df, ax=ax, cmap='bwr', center=0, annot=True, fmt='.0f', cbar=False)\n",
" else:\n",
" sns.heatmap(df, ax=ax, cmap='Blues', annot=True, fmt='.0f', cbar=False)\n",
" ax.set_yticklabels(assemblies['nanopore'].apply(lambda x: assemblies_alias[x]))\n",
" ax.set_yticklabels(assemblies['nanopore'].apply(lambda x: assemblies_alias[x]), rotation=45, va='top')\n",
" ax.set_ylabel('')\n",
" ax.set_xticklabels(assemblies['atp6'].apply(lambda x: assemblies_alias[x]))\n",
" ax.set_xticklabels(assemblies['atp6'].apply(lambda x: assemblies_alias[x]), rotation=45, ha='right')\n",
" ax.set_xlabel('')\n",
" ax.set_title(m_alias[m], size=14)\n",
" \n",
Expand All @@ -170,7 +170,7 @@
"fig.text(0.52, 0.47, 'D', size=24, weight='bold')\n",
" \n",
"#plt.show()\n",
"#plt.savefig('/home/mathieu/mhenault_landrylab/Publications/mito_ma/resubmission_GRes/fig/assembly_comparison.svg')\n",
"#plt.savefig('/home/mathieu/mhenault_landrylab/Publications/mito_ma/resubmission2_GRes/fig/assembly_comparison.svg')\n",
"plt.close()"
]
}
Expand Down
18 changes: 9 additions & 9 deletions divergence.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
"id": "8c3970f9-f0cf-4f95-9965-5bd26ad2bcb6",
"metadata": {},
"source": [
"# Fig S15"
"# Fig S4"
]
},
{
Expand All @@ -287,25 +287,25 @@
"metadata": {},
"outputs": [],
"source": [
"fig, axes = plt.subplots(ncols=2, figsize=[8,4], \n",
" gridspec_kw=dict(wspace=0.7, width_ratios=[3,2], left=0.12, right=0.98, top=0.9, bottom=0.15))\n",
"fig, axes = plt.subplots(nrows=2, figsize=[3,6], \n",
" gridspec_kw=dict(hspace=0.4, height_ratios=[3,2], left=0.28, right=0.93, top=0.82, bottom=0.12))\n",
"ax = axes[0]\n",
"sns.scatterplot(x='nuc_dist', y='mt_dist', hue='cross', palette=cross_color, data=dist_per_cross, ax=ax)\n",
"ax.set_xlabel('nuc divergence (subs site$^{-1}$)')\n",
"ax.set_ylabel('mt divergence (subs site$^{-1}$)')\n",
"ax.legend(loc=6, bbox_to_anchor=[1,0.5], frameon=False)\n",
"ax.set_ylabel('mt divergence\\n(subs site$^{-1}$)')\n",
"ax.legend(loc=6, bbox_to_anchor=[-0.05,1.25], ncol=3, frameon=False, handlelength=0.3)\n",
"\n",
"ax = axes[1]\n",
"ax.bar(dist_per_cross['cross'], dist_per_cross['ratio'], color=[cross_color[cross] for cross in cross_order], width=0.5)\n",
"ax.set_xlabel('')\n",
"ax.set_xticklabels(cross_order, rotation=90)\n",
"ax.set_ylabel('divergence ratio (nuc/mt)')\n",
"ax.set_ylabel('divergence ratio\\n(nuc/mt)')\n",
"\n",
"fig.text(0.03, 0.93, 'C', weight='bold', size=24)\n",
"fig.text(0.63, 0.93, 'D', weight='bold', size=24)\n",
"fig.text(0.01, 0.93, 'C', weight='bold', size=24)\n",
"fig.text(0.01, 0.35, 'D', weight='bold', size=24)\n",
"\n",
"sns.despine()\n",
"#plt.savefig('/home/mathieu/mhenault_landrylab/Publications/mito_ma/resubmission_GRes/fig/mito_nuc_divergence_CD.svg')\n",
"#plt.savefig('/home/mathieu/mhenault_landrylab/Publications/mito_ma/resubmission2_GRes/fig/mito_nuc_divergence_CD.svg')\n",
"#plt.show()\n",
"plt.close()"
]
Expand Down
Loading

0 comments on commit 4218846

Please sign in to comment.