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 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
@cannin
cannin / causalpath_total_protein_example_large_nodes.format
Last active January 16, 2024 06:37
Description of CausalPath .format files
# COLUMNS: For entries "all-nodes and color": obj_type all-nodes obj_subtype color
# COLUMNS: For entries "all-nodes and bordercolor": obj_type all-nodes obj_subtype color
# COLUMNS: For entries "node and color": obj_type node_label obj_subtype color
# COLUMNS: For entries "node and rppasite": obj_type node_label obj_subtype subtype_info|subtype_label|subtype_bkgrd_color|subtype_border_color
# COLUMNS: For entries "node and tooltip": obj_type node_label obj_subtype tooltip_information_onmousehover
# NOTE: "subtype_info" is also tooltip information for onmousehover for individual rppasite
node all-nodes color 255 255 255
node all-nodes bordercolor 50 50 50
node FOXA1 color 40 80 255
node FOXA1 tooltip FOXA1, -24.349700502698532
@cannin
cannin / data_causalpath.txt
Last active July 8, 2021 16:58
CausalPath Input Files for GPVI Mass Spectrometry Dataset (Use with CausalPath 1.2.0)
ID Symbols Sites Effect SignedP RF1_tmm RF3_tmm RM1_tmm RM2_tmm RM4_tmm AF1_tmm AF3_tmm AM1_tmm AM2_tmm AM4_tmm
FCER1G_Y58 FCER1G Y58 2.11849506973498e-05 14373.7574077909 22647.2457028369 16986.5946283221 27719.8497871752 25761.9333453212 330396.455874962 414293.146733761 274970.966990486 424255.557710368 424831.777807267
KIF13B_S1410 KIF13B S1410 -3.38001049753508e-05 222427.345933258 408896.243632753 536178.803602148 265699.614247014 315299.651610471 33008.9300818369 61839.5888539012 76572.8891839867 50171.5952669212 57210.6794113786
PPFIA1_S763 PPFIA1 S763 -3.38001049753508e-05 260733.273908766 260643.546811825 301800.661843004 269186.980592221 264805.096994688 58042.0671941481 58707.2094650245 67105.7372397264 67267.703407248 68742.5910655683
ERC1_S21 ERC1 S21 -3.40790075308345e-05 425882.416218268 473500.960254598 516485.607088445 420746.036892043 509023.952492173 93774.4387777743 99406.0045636096 108523.096047869 103967.484242926 130837.499972744
FCER1G_T66 FCER1G T66 4.38968506191598e-05 72383.74