Skip to content

Instantly share code, notes, and snippets.

View mxposed's full-sized avatar

Nick Markov mxposed

View GitHub Profile
fig, ax = plt.subplots(figsize=(8, 8))
sc.pl.umap(ds, color="cell_type", legend_loc="on data", size=10, ax=ax, show=False)
shrink_by = 0.1
xlim = ax.get_xlim()
ylim = ax.get_ylim()
xbound = xlim[0] + (xlim[1] - xlim[0]) * shrink_by
ybound = ylim[0] + (ylim[1] - ylim[0]) * shrink_by
b = ax.spines["bottom"]
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="style.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="main.js"></script>
</head>
<body>
speed: init 3.8186559677124023
speed: parsed 3.821230888366699
/anaconda3/bin/ipython:6: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).complete instead.
dbg: Start: complete
dbg: infer_node <Name: plt@1,0>@(1, 0) in MixedModuleContext(<ModuleValue: __main__@1-1 is_stub=False>)
dbg: context.goto <Name: plt@1,0> in (MixedModuleContext(<ModuleValue: __main__@1-1 is_stub=False>)): [MixedName(<CompiledName: (<CompiledValueName: string_name=NamespaceObject>).plt>)]
dbg: context.names_to_types: [MixedName(<CompiledName: (<CompiledValueName: string_name=NamespaceObject>).plt>)] -> S{<MixedObject: <module 'matplotlib.pyplot' from '/anaconda3/lib/p..; <ModuleValue: matplotlib.pyplot@4-3270 is_stub=False>>}
dbg: infer_trailer: PythonNode(trailer, [<Operator: .>, <Name: figure@1,4>]) in S{<MixedObject: <module 'matplotlib.pyplot' from '/anaconda3/lib/p..; <ModuleValue: matplotlib.pyplot@4-3270 is_stub=False>>}
dbg: context.goto <Name: figure@1,4> in (<MixedObject: <module 'matplotlib.pyplo
$ cat velocyto-sc14.sh
#!/bin/bash
#MSUB -A b1042
#MSUB -q genomics
#MSUB -l walltime=10:00:00
#MSUB -N velocyto-sc14
#MSUB -l nodes=1:ppn=4
#MSUB -o velocyto-sc14.out.log
#MSUB -e velocyto-sc14.err.log
class A:
a_list = []
def blah(self):
self.__class__.a_list.append('hello')
# can also write
# A.a_list.append('hello')
class B:
require(Seurat)
require(scmap)
require(DropletUtils)
require(SeuratConverter)
initLung <- function() {
cache <- '../dataset 1/SC01+02.Robj'
if (!file.exists(cache)) {
sc01.data <- Read10X(data.dir = "../dataset 1/SC01/")
sc01 <- CreateSeuratObject(raw.data = sc01.data, min.cells = 3, min.genes = 200, project = "SC01")
# coding: utf-8
a = """
"Le,88
leaving,88
lengths,88
Linen,88
lithographs.,88
mezzotint"
",88
@mxposed
mxposed / alumni-directory-todo-170214.md
Last active February 18, 2017 02:11 — forked from fedor57/alumni-directory-todo-170214.md
Директория выпускников 57 - todo 14.02.2017

##Корень

##Коды выпусников

  • добавить на сайт с кодами раздел Q & A с версткой соотв. типа
  • добавить ссылку на раздел в меню сайта с кодами
  • добавить action со ссылкой рядом с кнопкой Понятно в блок Что это?
  • залить тексты вопросов и ответов отсюда (Часть I)
@mxposed
mxposed / alumni-directory-todo-170211.md
Last active February 15, 2017 16:45 — forked from fedor57/alumni-directory-todo-170211.md
Директория выпусников 57 - доделки 11.02.17

Меню

  • Выпускники 57-й - директория

  • Классы выпуска

  • По алфавиту

  • Добавить выпускника - перенести направо

  • Поиск - разбивать по пробелам, искать подстроки без учета регистра

Я имел в виду, что можно посмотреть на все строки, где есть gene, потом сгруппировать одинаковые и посчитать:
$ fgrep '/gene=' AJ507799.txt | sort | uniq -c | wc -l
111
А потом посмотреть, что там есть:
$ fgrep '/gene=' AJ507799.txt | sort | uniq -c
И так же для белков:
$ fgrep '/protein_id=' AJ507799.txt | sort | uniq -c | wc -l