Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Updated the counts-umi-smk rule and it's scripts to python3 #93

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c30d4fa
Duplicated the file FastQ2doubleIndexBAM.py and added suffix _python3…
bioinformaticsguy Jan 7, 2024
b60ceff
updated the script FastQ2doubleIndexBAM_python3 in the counts_umi.smk…
bioinformaticsguy Jan 7, 2024
e2f9fb5
created a duplicated file MergeTrimReadsBAM_python3.py.
bioinformaticsguy Jan 7, 2024
eba52a6
updated the script in counts_umi.smk to _python3.
bioinformaticsguy Jan 7, 2024
1f2d4f9
applied 2to3 on files FastQ2doubleIndexBAM_python3.py and MergeTrimRe…
bioinformaticsguy Jan 13, 2024
bab4c33
Created the file library_python3.py.
bioinformaticsguy Jan 13, 2024
75d4361
added the pysam library to the dependencies in the python3.yaml file …
bioinformaticsguy Jan 13, 2024
77f4269
Pusing the converted python3 files that cause the following error.
bioinformaticsguy Jan 13, 2024
0d9edfc
created the new python3 version of MergeTrimReads_python3.py
bioinformaticsguy Jan 16, 2024
d19659b
Converted to python3 using the p2to3 library.
bioinformaticsguy Jan 16, 2024
21449cc
Updated the file MergeTrimReadsBAM_python3.py
bioinformaticsguy Jan 16, 2024
efc09ea
fixed the errors so that piplines runs fine.
bioinformaticsguy Jan 16, 2024
0cf383d
Removed raise exception as it is not needed in python3
bioinformaticsguy Jan 16, 2024
b792880
Reformated the sys.stderr.write string to f string to avoid the warrn…
bioinformaticsguy Jan 16, 2024
6a900ae
updated the env line and the scripts line according to python3 env an…
bioinformaticsguy Jan 16, 2024
efd6caa
Added the update header details in the header docstring of the files.
bioinformaticsguy Jan 16, 2024
8548945
prepending r before the strings in wildcard_constraints because of py…
bioinformaticsguy Jan 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ report: "report/workflow.rst"

##### General wirldcard constrains #####
wildcard_constraints:
project="[^/\.]+",
assignment="[^/\.]+",
condition="[^/_\.]+",
replicate="[^/_\.]+",
type="(DNA)|(RNA)",
config="[^/\.]+",
project=r"[^/\.]+",
assignment=r"[^/\.]+",
condition=r"[^/_\.]+",
replicate=r"[^/_\.]+",
type=r"(DNA)|(RNA)",
config=r"[^/\.]+",


##### localrules #####
Expand Down
1 change: 1 addition & 0 deletions workflow/envs/python3.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add it here because it is a minor thing (actually because of the Snakefile): change regex strings in the Snakefile to raw strings as mentioned here

Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ dependencies:
- pandas
- polars
- python
- pysam
6 changes: 3 additions & 3 deletions workflow/rules/counts/counts_umi.smk
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ rule counts_umi_create_BAM:
fw_fastq=lambda wc: getFW(wc.project, wc.condition, wc.replicate, wc.type),
rev_fastq=lambda wc: getRev(wc.project, wc.condition, wc.replicate, wc.type),
umi_fastq=lambda wc: getUMI(wc.project, wc.condition, wc.replicate, wc.type),
script_FastQ2doubleIndexBAM=getScript("count/FastQ2doubleIndexBAM.py"),
script_MergeTrimReadsBAM=getScript("count/MergeTrimReadsBAM.py"),
script_FastQ2doubleIndexBAM=getScript("count/FastQ2doubleIndexBAM_python3.py"),
script_MergeTrimReadsBAM=getScript("count/MergeTrimReadsBAM_python3.py"),
output:
"results/experiments/{project}/counts/useUMI.{condition}_{replicate}_{type}.bam",
params:
bc_length=lambda wc: config["experiments"][wc.project]["bc_length"],
umi_length=lambda wc: config["experiments"][wc.project]["umi_length"],
datasetID="{condition}_{replicate}_{type}",
conda:
"../../envs/python27.yaml"
"../../envs/python3.yaml"
log:
temp(
"results/logs/counts/umi/create_BAM.{project}.{condition}.{replicate}.{type}.log"
Expand Down
311 changes: 311 additions & 0 deletions workflow/scripts/count/FastQ2doubleIndexBAM_python3.py

Large diffs are not rendered by default.

Loading
Loading