-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating Docs for commit 39471b1 made on 2024-08-15T19:45:31+00:00 fr…
…om refs/heads/latest by meson800
- Loading branch information
0 parents
commit e137ba1
Showing
2,221 changed files
with
538,454 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# GitHub Pages Cache | ||
|
||
Nothing to see here. The contents of this branch are essentially a cache that's not intended to be viewed on github.com. | ||
|
||
The actual documentation lives on the latest branch (e.g. the default branch for the repository). | ||
|
||
This build is based on Sphinx, and uses a custom Python build script plus includes some of | ||
Michael Altfield's work on building multi-branch documentation: | ||
* https://tech.michaelaltfield.net/2020/07/18/sphinx-rtd-github-pages-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: cabd5fe9be86a8092a8632e59f67c08b | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+12.5 KB
en/Mary-test/.doctrees/general/centrifuge_motor_mount_replacement.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+12.9 KB
en/Mary-test/.doctrees/instruments/attune/empirical_troubleshooting.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+10.9 KB
en/Mary-test/.doctrees/instruments/core_facilities/alignment_supercloud.doctree
Binary file not shown.
Binary file added
BIN
+12.6 KB
en/Mary-test/.doctrees/instruments/core_facilities/animal_facility.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+14.9 KB
en/Mary-test/.doctrees/instruments/core_facilities/myco_testing.doctree
Binary file not shown.
Binary file added
BIN
+8.99 KB
en/Mary-test/.doctrees/instruments/core_facilities/seqdata_transfer.doctree
Binary file not shown.
Binary file added
BIN
+6.88 KB
en/Mary-test/.doctrees/instruments/core_facilities/supercloud.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+26.2 KB
en/Mary-test/.doctrees/plot_gallery/exporting_high_quality_figures.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+17.9 KB
en/Mary-test/.doctrees/plot_gallery/mixed_distribution_mean_plots.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+32.3 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/antibody_staining.doctree
Binary file not shown.
Binary file added
BIN
+38.3 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/atac_see.doctree
Binary file not shown.
Binary file added
BIN
+81.1 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/cellbaum.doctree
Binary file not shown.
Binary file added
BIN
+20.3 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/cfse_labeling.doctree
Binary file not shown.
Binary file added
BIN
+17.7 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/confocal.doctree
Binary file not shown.
Binary file added
BIN
+12.8 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/dna_fish.doctree
Binary file not shown.
Binary file added
BIN
+13.8 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/halo_labeling.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+6.8 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/hoechst_staining.doctree
Binary file not shown.
Binary file added
BIN
+25.4 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/image_segmentation.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+27 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/kapa_sybr_fast_qpcr.doctree
Binary file not shown.
Binary file added
BIN
+11.5 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/ki_image_analysis.doctree
Binary file not shown.
Binary file added
BIN
+18.7 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/magnetic_bead.doctree
Binary file not shown.
Binary file added
BIN
+26.9 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/nuclei_isolation_genomics.doctree
Binary file not shown.
Binary file added
BIN
+7.51 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/psoralen_qpcr.doctree
Binary file not shown.
Binary file added
BIN
+208 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/sci_ATAC_seq.doctree
Binary file not shown.
Binary file added
BIN
+53.6 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/single_cell_qpcr.doctree
Binary file not shown.
Binary file added
BIN
+37.3 KB
...y-test/.doctrees/protocols/biochem_and_analytics/single_shot_rna_isolation_and_rt.doctree
Binary file not shown.
Binary file added
BIN
+15.4 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/snap_labeling.doctree
Binary file not shown.
Binary file added
BIN
+25.6 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/tn5_titration.doctree
Binary file not shown.
Binary file added
BIN
+185 KB
en/Mary-test/.doctrees/protocols/biochem_and_analytics/western_blot.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+16.5 KB
en/Mary-test/.doctrees/protocols/in_vitro_transcription/DNA_template_design.doctree
Binary file not shown.
Binary file added
BIN
+2.95 KB
en/Mary-test/.doctrees/protocols/in_vitro_transcription/index.doctree
Binary file not shown.
Binary file added
BIN
+23.8 KB
en/Mary-test/.doctrees/protocols/in_vitro_transcription/mRNA_synthesis.doctree
Binary file not shown.
Binary file added
BIN
+12.7 KB
en/Mary-test/.doctrees/protocols/in_vitro_transcription/mRNA_transfection.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+28.6 KB
en/Mary-test/.doctrees/protocols/protein_production/bis_tris_protein_gels.doctree
Binary file not shown.
Binary file added
BIN
+37 KB
en/Mary-test/.doctrees/protocols/protein_production/chitin_protein_purification.doctree
Binary file not shown.
Binary file added
BIN
+36.6 KB
en/Mary-test/.doctrees/protocols/protein_production/denaturing_protein_gel.doctree
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+15 KB
en/Mary-test/.doctrees/protocols/protein_production/protein_expression.doctree
Binary file not shown.
Binary file added
BIN
+34.1 KB
en/Mary-test/.doctrees/protocols/protein_production/protein_purification.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+17.6 KB
en/Mary-test/.doctrees/protocols/tc/electroporation_of_plasmids_into_MEFs.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+62.7 KB
en/Mary-test/.doctrees/protocols/tc/tc-basics/adherent_cell_culture.doctree
Binary file not shown.
Binary file added
BIN
+17.4 KB
en/Mary-test/.doctrees/protocols/tc/tc-basics/cryopreservation_and_thawing.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+44.1 KB
en/Mary-test/.doctrees/protocols/tc/tc-basics/human_reprogramming.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+20.6 KB
en/Mary-test/.doctrees/protocols/tc/tc-basics/murine_bone_marrow_isolation.doctree
Binary file not shown.
Binary file added
BIN
+53.8 KB
en/Mary-test/.doctrees/protocols/tc/tc-basics/platE_MEF_reprogramming.doctree
Binary file not shown.
Binary file added
BIN
+30.2 KB
en/Mary-test/.doctrees/protocols/tc/tc-basics/transient_transfection.doctree
Binary file not shown.
Binary file added
BIN
+18.7 KB
en/Mary-test/.doctrees/protocols/tc/transgene_expression_via_ribozyme_switch.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
89 changes: 89 additions & 0 deletions
89
en/Mary-test/_downloads/0df861a356ef76f2df87e00194cbc164/histograms-1.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# ----- PLOTTING FUNCTION ------- | ||
|
||
def plot_hists(df, # DataFrame with data | ||
x, # variable (str, column header of df) or list of variables to plot | ||
sample_list, # list of samples (values of column 'ConditionLabel') to plot in order | ||
name, # short name (str) for saving the figure | ||
plot_title=None, # Super-title for plot (optional str) | ||
xlim=(1e1,1e6), # tuple or list of tuples (optional) for x-axis range on subplot(s) | ||
gates=None # list (optional) of x-values at which to draw vertical lines, i.e. gates | ||
): | ||
|
||
# Specify additional parameters | ||
lin = set(['FSC-A','FSC-H','FSC-W','SSC-A','SSC-H','SSC-W']) # list of variables to plot on linear scale (size-related params) | ||
condition_palette = pd.read_pickle('data/histogram/exp42_palette.pkl') # custom color palette (dict mapping Condition values to colors) | ||
sns.set_context('talk',rc={'font.family': 'sans-serif', 'font.sans-serif':['Helvetica Neue']}) | ||
|
||
sz = len(x) # number of subplots | ||
fig, axs = plt.subplots(1,sz,figsize=(sz*7,5)) | ||
|
||
# Create each subplot | ||
for i in range(sz): | ||
g = sns.kdeplot(data=df, x=x[i], ax=axs[i], | ||
hue='ConditionLabel', hue_order=sample_list, # samples are specified by the 'ConditionLabel' column in df | ||
palette=condition_palette, | ||
fill=True, alpha = 0.1, # shade under the curve, but faintly | ||
log_scale=(x[i] not in lin), # default to log scale unless variable is in the linear list | ||
legend=(i==sz-1), # add a legend only to the last subplot | ||
common_norm=True) # supposed to normalize area under the curve (?) | ||
|
||
# Formatting | ||
sns.despine(ax=g) # remove top and right plot border | ||
g.minorticks_off() | ||
|
||
# Set the x-axis range based on provided list or value | ||
if isinstance(xlim,list): g.set_xlim(xlim[i]) | ||
else: g.set_xlim(xlim) | ||
|
||
# Add a vertical line (gate) if specified | ||
if gates is not None: g.axvline(gates[i], c='gray', ls='--', alpha=0.5) | ||
|
||
# Adjust the legend to the right of the last subplot | ||
sns.move_legend(axs[-1], title='Condition', loc='upper left', bbox_to_anchor=(1,1), frameon=False) | ||
|
||
# Add a super-title to the plot, if specified | ||
fig.suptitle(plot_title) | ||
fig.tight_layout() | ||
|
||
# [NOT APPLICABLE HERE] Save the figure as an image to the path specified by output_path (not defined here) | ||
# uses rushd outfile function to save metadata associated with the figure | ||
# fig.savefig(rd.outfile(output_path/('hist-'+name+'.svg')),bbox_inches='tight') | ||
|
||
return fig | ||
# ----- END PLOTTING FUNCTION ------- | ||
|
||
# ----- Load data ----- | ||
labeler = pd.read_pickle('data/histogram/exp42_labeler.pkl') # dict mapping short Condition name to long ConditionLabel | ||
data = pd.read_csv('data/histogram/exp42_data-small.csv') # stored DataFrame of data with metadata | ||
|
||
# ----- Call the plotting function in a loop to generate plots with subsets of samples ----- | ||
|
||
# Specify variables -> this will generate two subplots | ||
x = ['mGL-A', 'mCherry-A'] | ||
|
||
# Filter data | ||
df = data.loc[(data[x[0]]>0) & (data[x[1]]>0)] # remove cells with log-unfriendly values | ||
# Normalize number of cells in each sample (Condition) by downsampling to smallest sample size | ||
num_cells = df.groupby(['Condition','Replicate'])[x[0]].count().min() | ||
df = df.groupby(['Condition']).sample(n=num_cells, random_state=1) | ||
|
||
# Dictionary of plots (separate figures) to generate | ||
# keys = short name that plots are saved under | ||
# values = list of samples (values in 'Condition' column) to include in the plot | ||
plot_list = { | ||
'tandem': ['260_False','260_True','261_False','261_True','262_False','262_True'], | ||
'divergent+dox': ['263_True','264_True','265_True'], | ||
'hPGK': ['260_False','260_True','263_False','263_True'], | ||
} | ||
|
||
# Loop to create each plot/figure | ||
for name, sample_list in plot_list.items(): | ||
|
||
# Convert short sample names above (Condition) to long names (ConditionLabel) -> this is particular to my df organization | ||
sample_list = [labeler[s] for s in sample_list] | ||
# Identify the subset of the data to plot | ||
dd = df.loc[df['ConditionLabel'].isin(sample_list)] | ||
|
||
plot_hists(dd, x, sample_list, name, | ||
xlim=[(1e0,1e6),(2e0,1e7)], # specify a different x-axis range for each variable | ||
gates=[3e2,0]) # draw a gate on the first subplot but not the second |
14 changes: 14 additions & 0 deletions
14
en/Mary-test/_downloads/1771e2288148197083ef6cf90992e536/sci_ATAC_seq-4.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
mapping = { | ||
**{f"A{x}": "sciAD1.3" for x in range(1,13)}, | ||
**{f"B{x}": "sciAD1.4" for x in range(1,13)}, | ||
**{f"C{x}": "sciAD1.5" for x in range(1,13)}, | ||
**{f"D{x}": "sciAD1.6" for x in range(1,13)}, | ||
**{f"E{x}": "sciAD1.7" for x in range(1,13)}, | ||
**{f"F{x}": "sciAD1.9" for x in range(1,13)}, | ||
**{f"G{x}": "sciAD1.10" for x in range(1,13)}, | ||
**{f"H{x}": "sciAD1.11" for x in range(1,13)}, | ||
} | ||
mapping = {**mapping, **{(k[0] + '0' + k[1]): v for k,v in mapping.items() if len(k) == 2}} | ||
fig = plt.figure() | ||
rd.plot.plot_mapping(mapping, style='category', fig=fig) | ||
plt.title("Transposition sciAD1 layout", fontsize=15) |
28 changes: 28 additions & 0 deletions
28
en/Mary-test/_downloads/1f16eaae4cd8d1384b6510d3e6940671/sci_ATAC_seq-3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
mapping = { | ||
"A3": "sciAD1.{3,4,5,6,7,9,10,11}", | ||
"A4": "sciAD1.{3,4,5,6,7,9,10,11}", | ||
"A5": "sciAD1.{3,4,5,6,7,9,10,11}", | ||
"A6": "sciAD1.{3,4,5,6,7,9,10,11}", | ||
"A7": "sciAD1.{3,4,5,6,7,9,10,11}", | ||
"A8": "sciAD1.{3,4,5,6,7,9,10,11}", | ||
"A9": "sciAD1.{3,4,5,6,7,9,10,11}", | ||
"A10": "sciAD1.{3,4,5,6,7,9,10,11}", | ||
"B1": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
"B2": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
"B3": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
"B4": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
"B5": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
"B6": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
"B7": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
"B8": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
"B9": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
"B10": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
"B11": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
"B12": "sciAD2.{1,3,4,6,7,8,11,12,13,14,15,17}", | ||
} | ||
mapping = {**mapping, **{(k[0] + '0' + k[1]): v for k,v in mapping.items() if len(k) == 2}} | ||
fig = plt.figure() | ||
rd.plot.plot_mapping(mapping, style='category', fig=fig) | ||
sns.move_legend(fig.get_axes()[0], 'lower center', bbox_to_anchor=(0.5,-0.31)) | ||
fig.tight_layout() | ||
plt.title("Transposition primer plate", fontsize=15) |
18 changes: 18 additions & 0 deletions
18
en/Mary-test/_downloads/2b66478282dbaaa25621b06ce88b746a/sci_ATAC_seq-5.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
mapping = { | ||
**{f"{x}1": "sciAD2.1" for x in "ABCDEFGH"}, | ||
**{f"{x}2": "sciAD2.3" for x in "ABCDEFGH"}, | ||
**{f"{x}3": "sciAD2.4" for x in "ABCDEFGH"}, | ||
**{f"{x}4": "sciAD2.6" for x in "ABCDEFGH"}, | ||
**{f"{x}5": "sciAD2.7" for x in "ABCDEFGH"}, | ||
**{f"{x}6": "sciAD2.8" for x in "ABCDEFGH"}, | ||
**{f"{x}7": "sciAD2.11" for x in "ABCDEFGH"}, | ||
**{f"{x}8": "sciAD2.12" for x in "ABCDEFGH"}, | ||
**{f"{x}9": "sciAD2.13" for x in "ABCDEFGH"}, | ||
**{f"{x}10": "sciAD2.14" for x in "ABCDEFGH"}, | ||
**{f"{x}11": "sciAD2.15" for x in "ABCDEFGH"}, | ||
**{f"{x}12": "sciAD2.17" for x in "ABCDEFGH"}, | ||
} | ||
mapping = {**mapping, **{(k[0] + '0' + k[1]): v for k,v in mapping.items() if len(k) == 2}} | ||
fig = plt.figure() | ||
rd.plot.plot_mapping(mapping, style='category', fig=fig) | ||
plt.title("Transposition sciAD2 layout", fontsize=15) |
36 changes: 36 additions & 0 deletions
36
en/Mary-test/_downloads/2ec64224349c36c39ba6631cfc61635c/mixed_distribution_mean_plots-1.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Read in data | ||
data = pd.read_csv('data/data_mGL_WPRE/data_mGL_WPRE.csv') | ||
|
||
# Plot mGL-H | ||
x = 'mGL-H' | ||
hue = 'cond' | ||
cond_list = ['mGL', 'mGL-WPRE'] | ||
colormap = {'mGL': 'lightgrey', | ||
'mGL-WPRE': 'limegreen'} | ||
|
||
# Plot | ||
fig, ax = plt.subplots(1, 1, figsize=(6, 4)) | ||
sns.kdeplot(ax=ax, data=data, x=x, hue=hue, hue_order=cond_list, | ||
log_scale=(True, False), common_norm=False, | ||
shade=True, palette=colormap) | ||
|
||
# Plot neg ctrl | ||
sns.kdeplot(ax=ax, data=data.loc[data['cond'] == 'Neg'], x=x, | ||
log_scale=(True, False), common_norm=False, | ||
shade=False, color='black', alpha=0.5, linestyle='--') | ||
ax.annotate('Neg', (0.08, 0.25), | ||
xycoords='axes fraction', alpha=0.5, ha='center') | ||
|
||
# Add threshold for mGL+ gating | ||
mGL_H_thresh = 2*10**2 | ||
ax.axvline(mGL_H_thresh, 0, 1, color='black') | ||
|
||
# Title | ||
plt.suptitle('4 dpi') | ||
# Adjust limits | ||
mGL_lim = (10, 10**6) | ||
ax.set_xlim(mGL_lim) | ||
|
||
# Misc plotting stuff | ||
fig.tight_layout() # Helps improve white spacing | ||
plt.show() |
4 changes: 4 additions & 0 deletions
4
en/Mary-test/_downloads/4495ece29809f8b231686789355fea39/test-1.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
df = pd.read_csv('data/test_data.csv') | ||
sns.scatterplot(data=df, x='x', y='y') | ||
sns.despine() | ||
plt.show() |
66 changes: 66 additions & 0 deletions
66
en/Mary-test/_downloads/8816ba9b8a60d3f0534141d709587e9c/flow_with_adjunct_hist-1.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Read in data | ||
data = pd.read_csv('data/data_flow_with_adjunct_hist/data_flow_with_adjunct_hist.csv') | ||
|
||
# Randomly sample 10^4 samples from each condition to make representative flow diagram | ||
numSamples = 10**4 | ||
small_data = data.groupby(['cond']).sample(n=numSamples, random_state=1) | ||
|
||
# General plotting params | ||
x = 'CFSE-A' | ||
y = 'sulfo-Cyanine5-A' | ||
hue = 'cond' | ||
cond_list = ['Ctrl', 'NIL', 'NILDD', 'NILDDRR'] | ||
colormap = {'Ctrl': 'grey', 'NIL': 'crimson', | ||
'NILDD': 'purple', 'NILDDRR': 'dodgerblue'} | ||
|
||
# definitions for the axes | ||
left, width = 0.1, 0.65 | ||
bottom, height = 0.1, 0.65 | ||
spacing = 0.005 | ||
|
||
rect_scatter = [left, bottom, width, height] | ||
rect_histx = [left, bottom + height + spacing, width, 0.2] | ||
rect_histy = [left + width + spacing, bottom, 0.2, height] | ||
|
||
# Set up figure | ||
fig = plt.figure(figsize=(6, 6)) | ||
ax_scatter = plt.axes(rect_scatter) | ||
ax_scatter.tick_params(direction='in', top=True, right=True) | ||
ax_histx = plt.axes(rect_histx) | ||
ax_histx.set_axis_off() | ||
ax_histy = plt.axes(rect_histy) | ||
ax_histy.set_axis_off() | ||
|
||
# Set limits | ||
xlim = (10, 1*10**5) | ||
ylim = (5*10**1, 1*10**5) | ||
ax_scatter.set_xlim(xlim) | ||
ax_scatter.set_ylim(ylim) | ||
ax_histx.set_xlim(xlim) | ||
ax_histy.set_ylim(ylim) | ||
|
||
# Make density plots | ||
sns.kdeplot(ax=ax_scatter, data=small_data, x=x, y=y, hue=hue, hue_order=cond_list, | ||
log_scale=True, common_norm=False, | ||
palette=colormap, alpha=0.7, fill=False, legend=True) | ||
|
||
# Plot histograms | ||
sns.kdeplot(ax=ax_histx, data=small_data, x=x, hue=hue, hue_order=cond_list, | ||
log_scale=True, common_norm=False, | ||
palette=colormap, alpha=0.1, fill=True, legend=False) | ||
sns.kdeplot(ax=ax_histy, data=small_data, y=y, hue=hue, hue_order=cond_list, | ||
log_scale=True, common_norm=False, | ||
palette=colormap, alpha=0.1, fill=True, legend=False) | ||
|
||
# Add in CFSE and EU lines | ||
CFSE_low_thresh = np.percentile(data[(data['cond'] == 'Ctrl')]['CFSE-A'], 20) | ||
EU_thresh = np.percentile( | ||
data[(data['cond'] == 'NIL') & (data['CFSE_cat'] == 'CFSE-low')]['sulfo-Cyanine5-A'], 50) | ||
ax_scatter.axvline(CFSE_low_thresh, 0, 1, color='black') | ||
ax_scatter.axhline(EU_thresh, 0, 1, color='black') | ||
|
||
# Title | ||
fig.suptitle('14 dpi') | ||
# Misc plotting stuff | ||
fig.tight_layout() # Helps improve white spacing | ||
plt.show() |
12 changes: 12 additions & 0 deletions
12
en/Mary-test/_downloads/b2101dd4d808c5515eb2ee61fa80e946/sci_ATAC_seq-1.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
mapping = { | ||
**{f"C{i}": "sciP1.{1-12}" for i in range(1,13)}, | ||
**{f"D{i}": "sciP1.{13-24}" for i in range(1,13)}, | ||
**{f"E{i}": "sciP1.{25-36}" for i in range(1,13)}, | ||
} | ||
mapping = {**mapping, **{(k[0] + '0' + k[1]): v for k,v in mapping.items() if len(k) == 2}} | ||
fig = plt.figure() | ||
rd.plot.plot_mapping(mapping, style='category', fig=fig) | ||
ax = fig.get_axes()[0] | ||
sns.move_legend(ax, 'lower center', bbox_to_anchor=(0.5,-0.42)) | ||
ax.set_title("sciP1 PCR primer plate", fontsize=15) | ||
fig.clip_box = ax.get_tightbbox() |
12 changes: 12 additions & 0 deletions
12
en/Mary-test/_downloads/b5cb02dfb06a2a298c48c503973bd697/sci_ATAC_seq-2.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
mapping = { | ||
**{f"{x}5": "sciP2.{1-8}" for x in 'ABCDEFGH'}, | ||
**{f"{x}6": "sciP2.{9-16}" for x in 'ABCDEFGH'}, | ||
**{f"{x}7": "sciP2.{17-24}" for x in 'ABCDEFGH'}, | ||
} | ||
mapping = {**mapping, **{(k[0] + '0' + k[1]): v for k,v in mapping.items() if len(k) == 2}} | ||
fig = plt.figure() | ||
rd.plot.plot_mapping(mapping, style='category', fig=fig) | ||
ax = fig.get_axes()[0] | ||
sns.move_legend(ax, 'lower center', bbox_to_anchor=(0.5,-0.42)) | ||
ax.set_title("sciP2 PCR primer plate", fontsize=15) | ||
fig.clip_box = ax.get_tightbbox() |
54 changes: 54 additions & 0 deletions
54
en/Mary-test/_downloads/bd364e1cecbce0bdf8ebc92ea6da15d2/mixed_distribution_mean_plots-2.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Categorize if mGL+ | ||
mGL_cat = list() | ||
for mGL_val in data['mGL-H']: | ||
if mGL_val > mGL_H_thresh: | ||
mGL_cat.append('mGL+') | ||
else: | ||
mGL_cat.append('mGL-') | ||
data['mGL_cat'] = mGL_cat | ||
|
||
# Get total counts and percent of mGL+ and mGL- | ||
well_group = ['cond', 'replicate', 'sampleNum'] # specifies we're splitting by cond >> bio rep >> tech rep >> etc... | ||
count_df = data.groupby([*well_group, 'mGL_cat'])['mGL-H' # Doesn't have to be mGL-H, any column would work | ||
].count().unstack(fill_value=0).stack().rename('count') # unstack()/stack() puts 0 if no mGL-H+ rather than dropping row | ||
percent_df = (count_df*100/count_df.groupby(well_group).transform('sum') | ||
).reset_index(name='percent') | ||
|
||
# Extract just the mGL+ cells | ||
data_mGL = data.loc[data['mGL_cat'] == 'mGL+'] | ||
percent_df_mGL = percent_df.loc[(percent_df['mGL_cat'] == 'mGL+')] | ||
|
||
# Calculate geom mean of mGL+ cells | ||
well_mGL_gmean_df = data_mGL.groupby(well_group)[ | ||
'mGL-H'].apply(scipy.stats.gmean).reset_index(name='mGL-H (gmean)') | ||
|
||
# Plotting parameters | ||
x = 'cond' | ||
y = 'mGL-H' | ||
order = ['mGL', 'mGL-WPRE'] | ||
pairs = [('mGL', 'mGL-WPRE')] | ||
colormap = {'mGL': 'lightgrey', | ||
'mGL-WPRE': 'limegreen'} | ||
|
||
# Plot | ||
fig, ax = plt.subplots(1, 1, figsize=(3, 3)) | ||
sns.boxplot( | ||
ax=ax, data=data_mGL, | ||
x=x, y=y, order=order, | ||
boxprops={'facecolor': 'None'}, showfliers=False) # Gets rid of boxplot colors and outliers | ||
sns.stripplot( | ||
ax=ax, data=well_mGL_gmean_df, | ||
x=x, y=y+' (gmean)', order=order, | ||
dodge=True, palette=colormap, size=5) | ||
|
||
# Add in stats | ||
annot = Annotator(ax=ax, data=well_mGL_gmean_df, x=x, y=y+' (gmean)', pairs=pairs, order=order) | ||
annot.configure(test='t-test_ind', text_format='star', loc='inside', verbose=2) | ||
annot.apply_and_annotate() | ||
|
||
# Adjust labels | ||
plt.ticklabel_format(axis='y',style='sci',scilimits=(0,0)) | ||
plt.ylabel(y) | ||
plt.title('4 dpi, HG') | ||
fig.tight_layout() # Helps improve white spacing | ||
plt.show() |
Oops, something went wrong.