Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with 10x genomics output #344

Open
olgabot opened this issue Oct 12, 2016 · 0 comments
Open

Integrate with 10x genomics output #344

olgabot opened this issue Oct 12, 2016 · 0 comments

Comments

@olgabot
Copy link
Collaborator

olgabot commented Oct 12, 2016

10X genomics has examples in Python and R for how to read their outputs, and we should integrate these into flotilla

import csv
import os
import scipy.io

genome = "hg19"
matrices_dir = "/opt/sample345/outs/filtered_gene_bc_matrices"
human_matrix_dir = os.path.join(matrices_dir, genome)
mat = scipy.io.mmread(os.path.join(human_matrix_dir, "matrix.mtx"))

genes_path = os.path.join(human_matrix_dir, "genes.tsv")
gene_ids = [row[0] for row in csv.reader(open(genes_path), delimiter="\t")]
gene_names = [row[1] for row in csv.reader(open(genes_path), delimiter="\t")]

barcodes_path = os.path.join(human_matrix_dir, "barcodes.tsv")
barcodes = [row[0] for row in csv.reader(open(barcodes_path), delimiter="\t")]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant