Skip to content

Commit

Permalink
Merge pull request #31 from KrishnaswamyLab/dburkhardt-patch-1-1
Browse files Browse the repository at this point in the history
Handling bashing of gene names when sparse==True
  • Loading branch information
dburkhardt authored Jun 3, 2018
2 parents 0b93475 + 86816c9 commit decb351
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/phate/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ def load_10X(data_dir, sparse=True, gene_labels='symbol'):
columns = pd.Index(genes[gene_labels])
if sparse and np.sum(columns.duplicated()) > 0:
warnings.warn(
"Duplicate gene names detected! Forcing `gene_labels='both'`."
"Duplicate gene names detected! Forcing `gene_labels='id'`."
"Alternatively, try loading the matrix with "
"`sparse=False`", RuntimeWarning)
columns = _combine_gene_id(genes)
columns = genes['id']

if sparse:
data = pd.SparseDataFrame(m.T, index=index,
Expand Down

0 comments on commit decb351

Please sign in to comment.