Questions tagged [scanpy]

Scanpy is a scalable toolkit for analyzing single-cell gene expression data. It includes preprocessing, visualization, clustering, pseudotime and trajectory inference, differential expression testing and simulation of gene regulatory networks.

Scanpy is a scalable toolkit for analyzing single-cell gene expression data built jointly with anndata. It includes preprocessing, visualization, clustering, trajectory inference and differential expression testing. The Python-based implementation efficiently deals with datasets of more than one million cells. For more information, see the docs and the github repository.

63 questions
0
votes
1 answer

Please tell me how to fill an empty matrix with elements using for loop

I am a beginner who is studying bioinformatics with scanpy these days. I am trying to improve so any help is very welcome, thanks lot! ##This lists contains gene names. Angio=['ADAM17','AXIN1','AXIN2','CCND2','DKK1','DKK4']…
supigen
  • 17
  • 4
0
votes
1 answer

making cache using cache=True does not work in Scanpy

`Hi, I my code does work if I use cache=False WT = sc.read_10x_mtx('/Users/sandb/OneDrive/UCB/result/scRNAseq/1strun/WT', var_names='gene_symbols', cache=False) but when I change chache=True WT =…
0
votes
0 answers

How to fix __init__() got an unexpected keyword argument 'location' error in scanpy.pl.umap?

I am trying to run single-cell analysis on scanpy 1.9.1. When I try to run scanpy.pl.umap(adata, color=["PDGFRB","RGS5"], s = 30), I get the following error: TypeError Traceback (most recent call last) in ----> 1…
0
votes
1 answer

How can this for loop code work? (pandas, jupyter, python)

i am a student working in bioinformatics using scanpy, python. During finding marker genes, i was going to make a data frame. The following is the code. pd.DataFrame({group + '_' + key[:1] : result[key][group] for group in groups for key in…
JJUN
  • 1
0
votes
1 answer

Trying to concat a list of 12 AnnData objects but am getting duplicates

I'm prepping our experimental data for trajectory analysis by partially following this guide here and I have a list of 12 AnnData objects that I read in as loom files. 6 of them come from one sequencing run whereas the other 6 come from another. I…
CelineDion
  • 906
  • 5
  • 21
0
votes
1 answer

I'm trying to subset from multiple obs in scanpy

enter image description hereenter image description here enter image description here Hello. I am a beginner who is studying scanpy. I'm trying to subset from multiple obs in scanpy. I can subset clusters in one obs. However, I want to subset…
supigen
  • 17
  • 4
0
votes
0 answers

ValueError: could not convert string to float: 'singlet'

I have this data in csv file which a column has string value (prediction column). How do I rectify the ValueError so that I can read the file?' Code I attempted: adata['prediction'].replace('singlet').astype(float)
Caroline
  • 119
  • 8
0
votes
0 answers

Use SpatialDE to evaluate my anndata.h5ad but no result

enter image description here enter image description here import SpatialDE import numpy as np import anndata import scanpy as sc import cv2 from sklearn.metrics import silhouette_score from sklearn import metrics import scanpy as sc import pandas as…
吕同轩
  • 1
  • 1
0
votes
1 answer

scanpy highly variable genes

filtering of highly variable genes using scanpy does not work in Windows. The same command has no issues while working with Mac. sc.pp.highly_variable_genes(adata, layer = 'raw_data', n_top_genes = 4000, flavor = 'seurat_v3') ImportError …
0
votes
1 answer

dataframe error when comparing expression levels: TypeError: Unordered Categoricals can only compare equality or not

I am working with an anndata object gleaned from analyzing single-cell RNAseq data using scanpy to obtain clusters. This is far along in the process (near completed) and I am now trying to obtain a list of the average expression of certain marker…
hiker
  • 163
  • 1
  • 1
  • 8
0
votes
1 answer

How to get specific RNA sequence of Anndata?

I have a question where I don´t know how to start this. We did a scRNA sequencing experiment and I now have an AnnData dataset. I already know a lot about this dataset mainly by using scanpy library and I would like to "finalise" the analysis by…
Greenline
  • 13
  • 5
0
votes
1 answer

Gseapy: how to get gene list used for each pathway

I am running an enrichment analysis with gseapy enrichr on a list of genes. I am using the following code: enr_res = gseapy.enrichr(gene_list = glist[:5000], organism = 'Mouse', gene_sets =…
Greenline
  • 13
  • 5
0
votes
1 answer

I am getting an error for a scanpy package when running it as bash script

I am encountering an error when I trying to save a scanpy results file on a cluster. One of the steps causes Jupyter kernel to crash because it takes a lot of memory. So in order to combat this I am trying to do that on the cluster and for that I…
Echo94
  • 3
  • 3
0
votes
1 answer

scv.pl.proportions(): numpy.AxisError in `Cellrank` workflow

I am new to use python to anlyze scRNA-seq. I run the cellrank workflow and always found this error. Here is my code for Cellrank: import scvelo as scv import scanpy as sc import cellrank import numpy as np scv.settings.verbosity =…
jpx
  • 111
  • 9
0
votes
1 answer

scanpy correlation matrix with dendrogram

I tried to recreate the correlation matrix that is described in scanpy's tutorial, using my own RNAseq dataset. The relevant function in scanpy is: sc.pl.correlation_matrix and the plot looks like this: The main question here is: how was this…
Ofir Shorer
  • 446
  • 1
  • 6
  • 16