Skip to content

Instantly share code, notes, and snippets.

@saketkc
saketkc / seenunseenbooks.R
Created April 9, 2024 04:07
seenunseenbooks
library(dplyr)
library(httr)
library(rvest)
library(xml2)
library(stringr)
library(DT)
library(htmltools)
domains_to_remove <- c(
@saketkc
saketkc / get_human_orthologs.R
Created March 7, 2024 05:18
get_human_orthologs.R
library(biomaRt)
species_tx2gene_map = c(
"btaurus",
"mauratus",
"mmulatta",
"ggallus",
"sscrofa",
"mmusculus",
"dreiro")
"rnorvegicus",
@saketkc
saketkc / dotplot_barplot_goseq.R
Last active January 10, 2024 23:08
clusterProfiler inspiredbarplot and dotplot for GOSeq
barplot <- function(df, showCategory=15){
df <- df[with(df, order(ratio, padj, decreasing = c(TRUE, FALSE))),]
df <- head(df, n=showCategory)
breaks <- round( c(0, 1/4, 2/4, 3/4, 1) * max(df[['ratio']]) , 2)
p_plot <- ggplot(df, aes_string(x="term", y="ratio", fill="padj")) +
geom_col() +
scale_y_continuous(expand=c(0, 0), breaks=breaks, limits=c(0, max(df[["ratio"]]+0.05))) +
scale_x_discrete(name='GO term') +
scale_fill_continuous(low="#00dbde", high="#FFF94C") +
theme(text=ggplot2::element_text(size=9)) +
@saketkc
saketkc / Beall_list.txt
Last active October 8, 2020 14:57
CSV versions of UGC approved journal list from http://www.ugc.ac.in/ugc_notices.aspx?id=1604 Raw
1088 Email Press
The 5th Publisher
ABC Journals
A M Publishers
Abhinav
Academe Research Journals
Academia Publishing
Academia Research
Academia Scholarly Journals (ASJ)
Academic and Business Research Institute

NVML: Driver/library version mismatch

Need to unload the the Nvidia driver kernel module (kmod) and then load it again as the current version is wrong.

Which drivers are loaded?

@HD VN:1.6 SO:coordinate
@SQ SN:chr1 LN:248956422
@SQ SN:chr10 LN:133797422
@SQ SN:chr11 LN:135086622
@SQ SN:chr12 LN:133275309
@SQ SN:chr13 LN:114364328
@SQ SN:chr14 LN:107043718
@SQ SN:chr15 LN:101991189
@SQ SN:chr16 LN:90338345
@SQ SN:chr17 LN:83257441
#!/usr/bin/env python
# coding: utf-8
# In[1]:
from collections import defaultdict, OrderedDict
import warnings
import gffutils
import pybedtools
#!/bin/bash
set -eox pipefail
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --add channels nvidia
conda config --add channels rapidsai
pip install git+https://github.com/dask/dask.git
pip install git+https://github.com/dask/distributed.git
conda install -y cuml cugraph louvain scanpy cudf cupy umap-learn scikit-learn numba>=0.48* leidenalg r-seurat r-reticulate
import re
import sys
import os
sys.path = ['', '/env/python', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages', '/usr/local/lib/python3.6/dist-packages/IPython/extensions', '/root/.ipython']
print('***********************************************************************')
print('Let us check on those pyarrow and cffi versions...')
print('***********************************************************************')
print()
#!/bin/bash
set -eox pipefail
#python -c "import sys, os; dist_package_index = sys.path.index('/usr/local/lib/python3.6/dist-packages'); sys.path = sys.path[:dist_package_index] + ['/usr/local/lib/python3.6/site-packages'] + sys.path[dist_package_index:]; sys.path.append('/usr/local/lib/python3.6/site-packages/'); exec(open('rapidsai-csp-utils/colab/update_modules.py').read(), globals()); print(sys.path)"
python -c "import sys, os; ['', '/env/python', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages', '/usr/local/lib/python3.6/site-packages/']; exec(open('rapidsai-csp-utils/colab/update_modules.py').read(), globals()); print(sys.path)"
nvcc --version
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --add channels nvidia
conda config --add channels rapidsai