Skip to content

Commit

Permalink
Merge pull request #2 from hxj5/master
Browse files Browse the repository at this point in the history
bug fix for mode 2
  • Loading branch information
hxj5 authored Oct 21, 2020
2 parents bcc766d + 211ddff commit f2b0850
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
cellsnp-lite
============

|conda| |platforms| |license|

.. |conda| image:: https://anaconda.org/bioconda/cellsnp-lite/badges/version.svg
:target: https://bioconda.github.io/recipes/cellsnp-lite/README.html
.. |platforms| image:: https://anaconda.org/bioconda/cellsnp-lite/badges/platforms.svg
:target: https://bioconda.github.io/recipes/cellsnp-lite/README.html
.. |license| image:: https://anaconda.org/bioconda/cellsnp-lite/badges/license.svg
:target: https://bioconda.github.io/recipes/cellsnp-lite/README.html

cellsnp-lite aims to pileup the expressed alleles in single-cell or bulk RNA-seq
data, which can be directly used for donor deconvolution in multiplexed
single-cell RNA-seq data, particularly with vireo_, which assigns cells to
Expand Down Expand Up @@ -133,7 +142,7 @@ This mode requires inputting a single bam file with either cell barcoded (add ``
cellsnp-lite -s $BAM -b $BARCODE -O $OUT_DIR -p 22 --minMAF 0.1 --minCOUNT 100 --gzip
# a bulk sample without cell barcodes and UMI tag
cellsnp-lite -s $bulkBAM -O $OUT_DIR -p 22 --minMAF 0.1 --minCOUNT 100 --UMItag None --gzip
cellsnp-lite -s $bulkBAM -I Sample0 -O $OUT_DIR -p 22 --minMAF 0.1 --minCOUNT 100 --UMItag None --gzip
Add ``--chrom`` if you only want to genotype specific chromosomes, e.g., ``1,2``, or ``chrMT``.

Expand Down
4 changes: 4 additions & 0 deletions cellsnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1691,6 +1691,10 @@ static int check_global_args(global_settings *gs) {
} else {
if (NULL == gs->sample_ids) {
if (NULL == gs->sid_list_file) {
if (NULL == (gs->sample_ids = (char**) calloc(gs->nin, sizeof(char*)))) {
fprintf(stderr, "[E::%s] failed to allocate space for sample_ids\n", __func__);
return -2;
}
kstring_t ks = KS_INITIALIZE, *s = &ks;
for (i = 0; i < gs->nin; i++) { ksprintf(s, "Sample_%d", i); gs->sample_ids[i] = strdup(ks_str(s)); ks_clear(s); }
gs->nsid = i; ks_free(s);
Expand Down

0 comments on commit f2b0850

Please sign in to comment.