Skip to content

Commit

Permalink
🇨🇳 release v0.5.2
Browse files Browse the repository at this point in the history
v0.5.2-b
  • Loading branch information
Puriney authored Apr 16, 2018
2 parents 81fad00 + b044f32 commit 1839866
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
6 changes: 3 additions & 3 deletions celseq2/qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ def plotly_qc(fpath, saveto, sep=',', name=''):

total_num_UMIs = expr.sum(axis=0)
num_detected_genes = (expr > 0).sum(axis=0)
mt_index = pd.Series(
[x for x in expr.index if x.startswith('mt-') or x.startswith('MT-')])
mt_index = [x for x in expr.index if x.startswith(
'mt-') or x.startswith('MT-')]
if not mt_index:
percent_mt = 0
else:
mt_umis = expr.loc[mt_index, :].sum(axis=0)
mt_umis = expr.loc[pd.Series(mt_index), :].sum(axis=0)
percent_mt = mt_umis / total_num_UMIs
percent_mt = percent_mt.replace(np.inf, 0)

Expand Down
4 changes: 4 additions & 0 deletions celseq2/template/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ STAR: '/absolute/path/to/star'
## Whare is the directory to save STAR index?
STAR_INDEX_DIR: '/absolute/path/to/star/folder/'

## Extra parameters to run aligner. For example:
## '--outSAMmultNmax 1 --outFilterScoreMinOverLread 0.3'
ALIGNER_EXTRA_PARAMETERS: ''

####################################
## Annotations ##
####################################
Expand Down
27 changes: 16 additions & 11 deletions celseq2/workflow/celseq2_beta.snakemake
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ BOWTIE2_INDEX_PREFIX = config.get('BOWTIE2_INDEX_PREFIX', None)
BOWTIE2 = config.get('BOWTIE2', None) # '/local/apps/bowtie2/2.3.1/bowtie2'
STAR_INDEX_DIR = config.get('STAR_INDEX_DIR', None)
STAR = config.get('STAR', None)
ALIGNER_EXTRA_PARAMETERS = config.get('ALIGNER_EXTRA_PARAMETERS', '')

## Annotations ##
# '/ifs/data/yanailab/refs/danio_rerio/danRer10_87/gtf/Danio_rerio.GRCz10.87.gtf.gz'
GFF = config.get('GFF', None)
Expand Down Expand Up @@ -345,20 +347,21 @@ if ALIGNER == 'bowtie2':
sam = join_path(DIR_PROJ, SUBDIR_ALIGN_ITEM,
'{itemID}', ALIGNER+'.bigsam'),
params:
threads = num_threads
threads = num_threads,
aligner_extra_parameters = ALIGNER_EXTRA_PARAMETERS,
log:
join_path(DIR_PROJ, SUBDIR_LOG, '{itemID}',
'Align-Bowtie2.log')
run:
shell(
"""
{BOWTIE2} \
-p {params.threads} \
-x {BOWTIE2_INDEX_PREFIX} \
-U {input.fq} \
-S {output.sam} 2>{log} \
--seed 42
""")
cmd = '{BOWTIE2} '
cmd += '-p {params.threads} '
cmd += '-x {BOWTIE2_INDEX_PREFIX} '
cmd += '-U {input.fq} '
cmd += '-S {output.sam} '
cmd += '--seed 42 '
cmd += '{params.aligner_extra_parameters} '
cmd += '2>{log} '
shell(cmd)

if ALIGNER == 'star':
rule align_star:
Expand All @@ -377,9 +380,10 @@ if ALIGNER == 'star':
star_prefix = join_path(DIR_PROJ, SUBDIR_ALIGN_ITEM,
'{itemID}', '.star', ''),
threads = num_threads,
aligner_extra_parameters = ALIGNER_EXTRA_PARAMETERS,
run:
mkfolder(params.star_prefix)
cmd = 'STAR '
cmd = '{STAR} '
cmd += ' --runRNGseed 42 '
cmd += ' --genomeLoad NoSharedMemory '
cmd += ' --runThreadN {params.threads} '
Expand All @@ -388,6 +392,7 @@ if ALIGNER == 'star':
cmd += ' --readFilesIn {input.fq} '
cmd += ' --outFileNamePrefix {params.star_prefix} '
# cmd += ' --outSAMmultNmax 1 '
cmd += ' {params.aligner_extra_parameters} '
shell(cmd)

starsam = join_path(params.star_prefix, 'Aligned.out.sam')
Expand Down
11 changes: 11 additions & 0 deletions docs/about/release_note.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@

---

## :fa-flag-checkered: **v0.5.2**

:fa-calendar: **2018-04-16**

:fa-star: **Features**

- Generate QC plots for UMI-counts matrices. If ST is performed, an extra QC plot masked on grid is generated.
- Allow experienced users to feed extra parameters to align. See issue #10.

---

## :fa-flag-checkered: **v0.5.1**

:fa-calendar: **2018-04-05**
Expand Down

0 comments on commit 1839866

Please sign in to comment.