def write_sparse(self, file_path: str):
coo = sparse.coo_matrix(self.X)<EOL>data = OrderedDict([(<NUM_LIT:0>, coo.row+<NUM_LIT:1>), (<NUM_LIT:1>, coo.col+<NUM_LIT:1>), (<NUM_LIT:2>, coo.data)])<EOL>df = pd.DataFrame(data, columns=data.keys())<EOL>with open(file_path, '<STR_LIT:w>') as ofh:<EOL><INDENT>ofh.write('<STR_LIT>')<EOL>ofh.write('<STR_LIT>' % '<STR_LIT:\t>'.join(self.genes.astype(str)))<EOL>ofh.write('<STR_LIT>' % '<STR_LIT:\t>'.join(self.cells.astype(str)))<EOL>ofh.write('<STR_LIT>')<EOL>ofh.write('<STR_LIT>' % (coo.shape[<NUM_LIT:0>], coo.shape[<NUM_LIT:1>], coo.nnz))<EOL>df.to_csv(ofh, sep='<STR_LIT:U+0020>', float_format='<STR_LIT>',<EOL>header=None, index=None)<EOL><DEDENT>
Write a sparse representation to a tab-delimited text file.

        TODO: docstring