Skip to content

Commit

Permalink
chore: Merge branch 'main' of https://github.com/CCBR/CHARLIE
Browse files Browse the repository at this point in the history
  • Loading branch information
kelly-sovacool committed Nov 5, 2024
2 parents e0e53b8 + e5360b6 commit e450d1b
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 38 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

- CHARLIE was falsely throwing a file permissions error for tempdir values containing bash variables. (#118, @kelly-sovacool)
- Singularity bind paths were not being set properly. (#119, @kelly-sovacool)
- Update docker containers to set `$PYTHONPATH`. (#119, @kelly-sovacool)
- Update docker containers to set `$PYTHONPATH`. (#119, #125, @kelly-sovacool)
- Otherwise, this environment variable can be carried over and cause package conflicts when singularity is not run with `-C`.
- Fix `reconfig` to correctly replace variables in the config file. (#121, @kelly-sovacool)
- Prevent using excessive memory when copying reference files. (#126, @kelly-sovacool)

## CHARLIE 0.11.0

Expand Down
2 changes: 1 addition & 1 deletion config/containers.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
containers:
base: "docker://nciccbr/ccbr_ubuntu_base_20.04:v6"
base: "docker://nciccbr/ccbr_ubuntu_base_20.04:v7"
bowtie1: "docker://nciccbr/charlie_bowtie1:v0.1.1"
circexplorer: "docker://nciccbr/ccbr_circexplorer:v1.0"
circRNA_finder: "docker://nciccbr/charlie_circrna_finder:v1.0.1"
Expand Down
5 changes: 2 additions & 3 deletions workflow/rules/init.smk
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ def append_files_in_list(flist, ofile):
with open(ofile, "w") as outfile:
for fname in flist:
with open(fname) as infile:
l = infile.read()
l = l.strip()
outfile.write("%s\n" % (l))
for line in infile:
outfile.write(line)
return True


Expand Down
68 changes: 35 additions & 33 deletions workflow/rules/post_findcircrna_processing.smk
Original file line number Diff line number Diff line change
Expand Up @@ -278,20 +278,21 @@ rule create_circExplorer_merged_found_counts_table:
),
outdir=join(WORKDIR, "results", "{sample}", "circExplorer"),
tmpdir=f"{TEMPDIR}/{str(uuid.uuid4())}",
container: config['containers']['star_ucsc_cufflinks']
shell:
"""
set -exo pipefail
mkdir -p {params.tmpdir}
python3 {params.pythonscript} \\
-b {input.bsj_found_counts} \\
-l {input.linear_spliced_counts} \\
-o {output.found_counts_table}
python3 {params.pythonscript2} \\
--annotationcounts {input.annotation_counts} \\
--allfoundcounts {output.found_counts_table} \\
--countstable {output.count_counts_table}
"""
set -exo pipefail
mkdir -p {params.tmpdir}
python3 {params.pythonscript} \\
-b {input.bsj_found_counts} \\
-l {input.linear_spliced_counts} \\
-o {output.found_counts_table}
python3 {params.pythonscript2} \\
--annotationcounts {input.annotation_counts} \\
--allfoundcounts {output.found_counts_table} \\
--countstable {output.count_counts_table}
"""


if RUN_MAPSPLICE:
Expand Down Expand Up @@ -443,24 +444,25 @@ rule create_hq_bams:
additives=ADDITIVES,
viruses=VIRUSES,
container: config['containers']["base"]
shell:"""
set -exo pipefail
outdir=$(dirname {output.outbam})
if [ ! -d $outdir ];then mkdir -p $outdir;fi
cd $outdir
python3 {params.script} \\
-i {input.inbam} \\
-t {input.countstable} \\
-o {output.outbam} \\
--regions {params.regions} \\
--host "{params.host}" \\
--additives "{params.additives}" \\
--viruses "{params.viruses}" \\
--sample_name {params.samplename}
samtools index {output.outbam}
for bam in $(ls {params.samplename}.*.HQ_only.BSJ.bam);do
if [ ! -f "${{bam}}.bai" ];then
samtools index $bam
fi
done
"""
shell:
"""
set -exo pipefail
outdir=$(dirname {output.outbam})
if [ ! -d $outdir ];then mkdir -p $outdir;fi
cd $outdir
python3 {params.script} \\
-i {input.inbam} \\
-t {input.countstable} \\
-o {output.outbam} \\
--regions {params.regions} \\
--host "{params.host}" \\
--additives "{params.additives}" \\
--viruses "{params.viruses}" \\
--sample_name {params.samplename}
samtools index {output.outbam}
for bam in $(ls {params.samplename}.*.HQ_only.BSJ.bam);do
if [ ! -f "${{bam}}.bai" ];then
samtools index $bam
fi
done
"""

0 comments on commit e450d1b

Please sign in to comment.