Skip to content

Instantly share code, notes, and snippets.

View vjcitn's full-sized avatar

Vince Carey vjcitn

View GitHub Profile
@vjcitn
vjcitn / app1.R
Created December 14, 2024 13:47
learning how to use click, too much rerendering
library(shiny)
library(SpatialData)
library(SpatialData.plot)
library(SpatialData.data)
library(ggmap)
library(ggplot2)
library(sf)
if (!exists("brdat")) brdat = Breast2fov_10x()
@vjcitn
vjcitn / litbr.R
Created December 14, 2024 12:57
simple subregion select and crop
library(SpatialData)
library(SpatialData.data)
library(sf)
library(ggplot2)
if (!exists("br")) br = Breast2fov_10x()
brsh = shape(br)
library(SpatialData.plot)
# some points to form a subregion
pick = structure(list(x = c(355.185319678255, 353.624236083554, 510.140679646861,
@vjcitn
vjcitn / parqanno.R
Created November 23, 2024 15:34
bioc anno in OSN
make_parq_url = function(stub) {
stub = sub("parquet$", "", stub)
sprintf("https://mghp.osn.xsede.org/bir190004-bucket01/BiocParquetAnno/%s.parquet", stub)
}
if (!dbIsValid(con)) con = dbConnect(duckdb())
query_osn = function(con, stub="gene_info") {
url = make_parq_url(stub)
dbExecute(con, "INSTALL httpfs from core_nightly;")
---
title: "`Some SpatialData visualizations`"
date: "`r format(Sys.Date(), '%B %d, %Y')`"
package: "`r BiocStyle::pkg_ver('SpatialData')`"
author:
- name: Helena Lucia Crowell
- name: Louise Deconinck
- name: Artür Manukyan
- name: Dario Righelli
- name: Estella Dong
@vjcitn
vjcitn / noble_err.txt
Created November 21, 2024 13:15
error in noble
trying URL 'https://bioconductor.org/packages/3.21/bioc/src/contrib/parody_1.65.0.tar.gz'
Content type 'application/x-gzip' length 499981 bytes (488 KB)
==================================================
downloaded 488 KB
Error: ERROR: no permission to install to directory ‘/usr/local/lib/R/host-site-library’
@vjcitn
vjcitn / biocsoft.owx
Created October 29, 2024 00:25
owl for biocviews
<?xml version="1.0"?>
<Ontology xmlns="http://www.w3.org/2002/07/owl#"
xml:base="http://www.semanticweb.org/vincent/ontologies/2024/7/untitled-ontology-10"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
ontologyIRI="http://www.semanticweb.org/vincent/ontologies/2024/7/untitled-ontology-10">
<Prefix name="" IRI="http://www.semanticweb.org/vincent/ontologies/2024/7/untitled-ontology-10/"/>
<Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
@vjcitn
vjcitn / install_py_events.txt
Created October 23, 2024 21:29
log of reticulate::install_python events
> reticulate::install_python(version="3.12")
trying URL 'https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer'
Content type 'text/plain; charset=utf-8' length 2827 bytes
==================================================
downloaded 2827 bytes
Installing pyenv ...
Cloning into '/home/stvjc/.local/share/r-reticulate/pyenv'...
remote: Enumerating objects: 1289, done.
remote: Counting objects: 100% (1289/1289), done.
@vjcitn
vjcitn / maf2key.R
Last active October 23, 2024 12:10
create data.frames to help merge AlphaMissense pathogenicity scores to MAF objects from maftools
#' from a MAF instance create a key with ref, alt and positional information,
#' return in a data.frame with key and gene symbol
#' @param mafinst instance of S4 class MAF from maftools
#' @param altfield character(1) name of field to use for mutation substitution
#' @param donorfield character(1) name of field to use for donor
#' @param uniprot_ok character() or NULL, defaults to NULL, if non-NULL, data to be returned will
#' only include records with UNIPROT id matching an element in this vector
#' @export
maf2key = function(mafinst, altfield="Tumor_Seq_Allele2", donorfield="Tumor_Sample_Barcode",
@vjcitn
vjcitn / curlminitest.Rmd
Created October 11, 2024 11:55
triggers segfault on ubuntu 24.04 under R 4.4.1, when compiled with rmarkdown::render
---
title: "Triggers a curl/httr segfault during R CMD build"
author: Hervé Pagès
output:
BiocStyle::html_document:
toc: true
toc_depth: 2
vignette: >
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
@vjcitn
vjcitn / sessioinfo.txt
Created October 11, 2024 11:40
ubuntu 24.04 gdb trace
> sessionInfo()
R version 4.4.1 Patched (2024-09-30 r87215)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.1 LTS
Matrix products: default
BLAS: /usr/local/lib/R/lib/libRblas.so
LAPACK: /usr/local/lib/R/lib/libRlapack.so; LAPACK version 3.12.0
locale: