Skip to content

Instantly share code, notes, and snippets.

View cannin's full-sized avatar

Augustin Luna cannin

View GitHub Profile
@cannin
cannin / README.md
Last active June 26, 2024 20:01
rcellminer_chatgpt.ipynb

Getting Started

  1. Go to https://chat.openai.com/ and sign in (make an account if you do not have one)
  2. Copy and paste the following text into the text bar at the bottom of the page (after accepting the various terms and disclosures):
Imagine you are helping me interact with several dataset of cancer genomics data. At any given point of time, you have the following abilities. You are also required to output code for some of the requests.

Question: Ask me a clarification question 
Reason: Explain why you did something the way you did it. 
@cannin
cannin / calcium_actin_interactions.txt
Created February 15, 2023 03:31
Pathway Commons Extract Interactions with Specific Nodes
PARTICIPANT_A INTERACTION_TYPE PARTICIPANT_B INTERACTION_DATA_SOURCE INTERACTION_PUBMED_ID PATHWAY_NAMES MEDIATOR_IDS
ACTA2 in-complex-with CALD1 Reactome NA Smooth Muscle Contraction http://pathwaycommons.org/pc12/Complex_0518f6295b1ef06468655bd97bab06cd;http://pathwaycommons.org/pc12/Complex_31d66cd5a279d9da536a7808146a93e4;http://pathwaycommons.org/pc12/Complex_c0fb59281e2cbea8227d357ffd78f564;http://pathwaycommons.org/pc12/Complex_73a822be281ea321fb7bbc8d3b2e5b10
ACTA2 in-complex-with ITGA1 Reactome NA Smooth Muscle Contraction http://pathwaycommons.org/pc12/Complex_0518f6295b1ef06468655bd97bab06cd;http://pathwaycommons.org/pc12/Complex_31d66cd5a279d9da536a7808146a93e4;http://pathwaycommons.org/pc12/Complex_c0fb59281e2cbea8227d357ffd78f564;http://pathwaycommons.org/pc12/Complex_73a822be281ea321fb7bbc8d3b2e5b10
ACTA2 in-complex-with ITGB5 Reactome NA Smooth Muscle Contraction http://pathwaycommons.org/pc12/Complex_0518f6295b1ef06468655bd97bab06cd;http://pathwaycommons.org/pc12/Complex_31d66cd5a279d9da536a7
@cannin
cannin / README.md
Last active July 6, 2024 13:19
kaios_data

KaiOS Data

Key Mapping

  • arrows: 37 L, 38 T, 39 R, 40 B
  • OK or sides: 0
  • OK hold is 13
  • 1: 49
  • 2: 50
  • 3: 51
  • 0: 48
/* Classless.css v1.0
Table of Contents:
1. Theme Settings
2. Reset
3. Base Style
4. Extras (remove unwanted)
5. Classes (remove unwanted)
*/
@cannin
cannin / config.json
Last active September 6, 2023 11:40
Use syblars (https://github.com/iVis-at-Bilkent/syblars) to Generate Layout and Render SBGNML to PNG using Python
{"layoutOptions": {
"name": "fcose",
"randomize": true,
"padding": 30
},
"imageOptions": {
"format": "png",
"background": "transparent",
"width": 1280,
"height": 1280,
0.19100112 0.46828908 0.8881515 0.3272082 0.44101298 0.13238761 0.06625041 0.42884535 0.45125055 0.54849786
0.73450327 0.968179 0.44648758 0.10997138 0.2849175 0.5890882 0.053468592 0.7258484 0.8558861 0.28162476
0.34389842 0.6496306 0.70850253 0.5590548 0.93613046 0.18099453 0.2924698 0.13112783 0.25727338 0.29037902
0.67264825 0.36550987 0.7641897 0.5965308 0.30332556 0.7546757 0.88458216 0.6731449 0.1464198 0.2685193
0.59329206 0.8943774 0.061935168 0.20078066 0.16109781 0.0445861 0.456919 0.34288594 0.4962387 0.3457089
@cannin
cannin / remap_cluster_labels.R
Created August 9, 2022 18:25
Map Cluster Labels Between Two Different Sets of Labels
# REMAPPING START ----
# Load data
load("20220809_module_mapping.RData")
# Focus on genes present in both sets of results or the Rand Index cannot be calculated
lec_df_no_all <- merge(nb2010_noweights$moduleMembership, pc_noweights$moduleMembership, by = "geneSymbol")
sort(table(nb2010_noweights$moduleMembership$membership))
sort(table(pc_noweights$moduleMembership$membership))
@cannin
cannin / extract_pubchem_info.R
Last active May 11, 2022 18:46
Extract FDA Approval, Clinical Trial, and PubMed Citation Information from PubChem XML Data
library(xml2)
library(magrittr)
# NOTE: Example Uses Vemurafenib, PubChem CID: 42611257
url <- "https://pubchem.ncbi.nlm.nih.gov/rest/pug_view/data/compound/42611257/XML"
#download.file(url, "pubchem_42611257.xml")
# READ FILE ----
doc <- read_xml('pubchem_42611257.xml')
@cannin
cannin / README.md
Last active April 25, 2022 19:16
Map clinicaltrials.gov names to DrugBank identifiers

Map Clinical Trial Data (clinicaltrials.gov) to DrugBank Identifiers

  1. Run get_ctrdata.R to get drug names associated with a set of drug trials
  2. Run map_clinical_trials_to_drugbank.R to map names to DrugBank IDs

Results are exported to a CSV file

@cannin
cannin / ccle_oncoprint_sample.tsv
Created April 22, 2022 19:13
Transform cBioPortal Oncoprint Download for ComplexHeatmap Oncoprint Visualization
track_name track_type A2058_SKIN A2780_OVARY BT549_BREAST CAL62_THYROID HCC15_LUNG KMRC20_KIDNEY SNU1_STOMACH SNU449_LIVER U2OS_BONE YAPC_PANCREAS
BRAF CNA amp_rec
CDK4 CNA
CTNNB1 CNA Deep Deletion
BRAF MUTATIONS Missense Mutation (putative driver) Missense Mutation (putative passenger) Missense Mutation (putative passenger)
CDK4 MUTATIONS
CTNNB1 MUTATIONS Missense Mutation (putative driver) splice
BRAF MRNA
CDK4 MRNA
CTNNB1 MRNA