Layout --> Node layout Tools --> Scale:
This file contains hidden or 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
| # author: Anton Kratz | |
| # created: Mon Dec 17 19:08:48 PST 2018 | |
| # Based on original code by Mike Yu which is at [1]. However [1] has various NDEX and other | |
| # code intermingled which is not necessary in this context. Also, I am building a similarity | |
| # table for DNA repair on the fly. | |
| # [1] https://github.com/michaelkyu/ddot/blob/master/examples/Process_the_Gene_Ontology.ipynb | |
| import requests |
Delete all lines in the file myfile that contain the string foobar:
sed -i '/foobar/d' myfilefile1: A list of keys, one key one line
file2: A table, the keys are in column 1
what this does: pull out the lines from the table which match a key from a list
time awk -F' ' 'NR==FNR{c[$1]++;next};c[$1] > 0' file1 file2 > output.txtconda adds an uncalled for (base) before my PS1 prompt. Most solutions suggest to edit the .condarc file. This did not work for me. Instead:
conda config --set auto_activate_base Falsehttps://askubuntu.com/questions/1026383/why-does-base-appear-in-front-of-my-terminal-prompt
This file contains hidden or 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
| Select All | |
| `Object > Clipping mask > Release` | |
| `Object > Path > Clean up` | |
| Clipping masks. Deleting an object deletes random objects scattered throughout b.c they are connected thru the clipping mask. I do not want this. |
This file contains hidden or 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
| import pubchempy as pcp | |
| import pandas as pd | |
| import numpy as np | |
| from collections import OrderedDict | |
| drugs_df = pd.read_csv('oli_drugs.csv') | |
| def queryPubChem(compounds,batchlist = None,match='name'): | |
| """ | |
| This function queries the PubChem database to retrieve both the isomeric smile and CID of a compound. |
This file contains hidden or 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
| x = c(0.8846, 1.1554, 0.9317, 0.9703, 0.9053, 0.9454, 1.0146, 0.9012, 0.9055, 1.3307) | |
| y = c(0.9828, 1.0329, 0.931, 1.3794, 0.9273, 0.9605, 1.0259, 0.9542, 0.9717, 0.9357) | |
| ShortSci = c("MotAlb", "PruMod", "EriRub", "LusMeg", "PhoOch", "PhoPho", | |
| "SaxRub", "TurMer", "TurPil", "TurPhi") | |
| df <- data.frame(x = x, y = y, z = ShortSci) | |
| library(ggplot2) | |
| library(ggrepel) | |
| p1 <- ggplot(data = df, aes(x = x, y = y)) + theme_bw() + | |
| geom_text_repel(aes(label = z), |
This file contains hidden or 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
| #' symlog transformation | |
| #' | |
| #' `symlog_trans()` transforms data using `log(x)` for `abs(x) > thr`, where | |
| #' `thr` is a tuneable threshold, but leaves the data linear for `abs(x) < thr`. | |
| #' (credit for base code to https://stackoverflow.com/users/1320535/julius-vainora) | |
| #' | |
| #' | |
| #' @param base base of logarithm | |
| #' @param thr numeric threshold for transitioning from log to linear | |
| #' @param scale numeric scaling factor for data |
