Skip to content

Commit

Permalink
perform join left operation
Browse files Browse the repository at this point in the history
Co-authored-by: Gregor Sturm <[email protected]>
  • Loading branch information
fmalmeida and grst authored Oct 30, 2024
1 parent ae8809a commit 68464de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/local/templates/mtx_to_h5ad_kallisto.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _mtx_to_adata(

txp2gene = pd.read_table(glob.glob(f"{t2g}")[0], header=None, names=["gene_id", "gene_symbol"], usecols=[1, 2])
txp2gene = txp2gene.drop_duplicates(subset="gene_id").set_index("gene_id")
adata.var = pd.merge(adata.var, txp2gene, left_index=True, right_index=True)
adata.var = adata.var.join(txp2gene, how="left")

return adata

Expand Down

0 comments on commit 68464de

Please sign in to comment.