Skip to content

Commit 19d195b

Browse files
authored
Merge pull request #1072 from maxplanck-ie/createIndices_orgyamls
Create indices orgyamls
2 parents 55e560b + 1a0d33d commit 19d195b

File tree

9 files changed

+23
-16
lines changed

9 files changed

+23
-16
lines changed

.github/workflows/linux.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ jobs:
100100
'CONDA_PREPROCESSING_ENV',
101101
'CONDA_NONCODING_RNASEQ_ENV',
102102
'CONDA_SAMBAMBA_ENV',
103-
'CONDA_pysam_ENV'
103+
'CONDA_pysam_ENV',
104+
'CONDA_FQLINT_ENV'
104105
]
105106
runs-on: ubuntu-latest
106107
steps:

.github/workflows/osx.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ jobs:
3131
'CONDA_PREPROCESSING_ENV',
3232
'CONDA_NONCODING_RNASEQ_ENV',
3333
'CONDA_SAMBAMBA_ENV',
34-
'CONDA_pysam_ENV'
34+
'CONDA_pysam_ENV',
35+
'CONDA_FQLINT_ENV'
3536
]
3637
runs-on: macos-latest
3738
steps:

docs/content/News.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ________________
66

77
* installation test for python 3.13
88
* bulk mode in makePairs wf
9+
* Removal of --user flag in createIndices. Organism yamls are by default written to both installation folder and output folder.
910

1011
snakePipes 3.0.0
1112
________________

snakePipes/common_functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def set_env_yamls():
4242
'CONDA_NONCODING_RNASEQ_ENV': 'envs/noncoding.yaml',
4343
'CONDA_SAMBAMBA_ENV': 'envs/sambamba.yaml',
4444
'CONDA_pysam_ENV': 'envs/pysam.yaml',
45-
'CONDA_SEACR_ENV': 'envs/chip_seacr.yaml'}
45+
'CONDA_SEACR_ENV': 'envs/chip_seacr.yaml',
46+
'CONDA_FQLINT_ENV': 'envs/fqlint.yaml'
47+
}
4648

4749

4850
def merge_dicts(x, y):

snakePipes/shared/rules/FASTQ.snakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if pairedEnd or pipeline=="scrnaseq":
55
r2 = indir+"/{sample}"+reads[1]+ext
66
output:
77
temp("originalFASTQ/{sample}.valid")
8-
conda: CONDA_SHARED_ENV
8+
conda: CONDA_FQLINT_ENV
99
shell:"""
1010
fq lint {input.r1} {input.r2}
1111
touch {output}
@@ -16,7 +16,7 @@ else:
1616
r1 = indir+"/{sample}"+reads[0]+ext
1717
output:
1818
temp("originalFASTQ/{sample}.valid")
19-
conda: CONDA_SHARED_ENV
19+
conda: CONDA_FQLINT_ENV
2020
shell:"""
2121
fq lint {input.r1}
2222
touch {output}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
channels:
2+
- bioconda
3+
dependencies:
4+
- fq = 0.12.0

snakePipes/shared/rules/envs/shared.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ dependencies:
1515
- multiqc = 1.23
1616
- fastp = 0.23.4
1717
- umi_tools = 1.1.4
18-
- fq = 0.11.0
1918
- pybigwig = 0.3.22
2019

snakePipes/workflows/createIndices/Snakefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,15 @@ onsuccess:
171171
f = open(os.path.join(outdir, "genome_fasta", "effectiveSize"))
172172
organismDictionary['genome_size'] = int(float(f.read().strip()))
173173
f.close()
174-
if not userYAML:
175-
yamlPath = os.path.join(maindir, organismsDir, "{}.yaml".format(genome))
176-
else:
177-
yamlPath = os.path.join(outdir, "{}.yaml".format(genome))
178-
print("Storing the organism YAML file in {}".format(yamlPath))
179-
cf.write_configfile(yamlPath, organismDictionary)
174+
orgDir_yamlPath = os.path.join(maindir, organismsDir, f"{genome}.yaml")
175+
outDir_yamlPath = os.path.join(outdir, f"{genome}.yaml")
176+
try:
177+
cf.write_configfile(orgDir_yamlPath, organismDictionary)
178+
print(f"{genome} yaml written to {orgDir_yamlPath}")
179+
except (PermissionError, FileNotFoundError) as e:
180+
print(f"Error writing in the organism dir {e}")
181+
cf.write_configfile(outDir_yamlPath, organismDictionary)
182+
print(f"{genome} yaml written to {outDir_yamlPath}")
180183
if "verbose" in config and config["verbose"]:
181184
print("\n--- index creation workflow finished successfully! --------------------------------\n")
182185

snakePipes/workflows/createIndices/createIndices.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ def parse_args(defaults={"configFile": None, "clusterConfigFile": None,
7777
optional.add_argument("--rmskURL",
7878
help="URL or local path to where the repeat masker output file is located. This is only required if you plan to run the ncRNAseq workflow.")
7979

80-
optional.add_argument("--userYAML",
81-
action="store_true",
82-
help="By default, this workflow creates an organism YAML file where snakePipes will look for it by default. If this isn't desired (e.g., you don't want the organism to be selectable by default or you don't have write permissions to the snakePipes installation) you can specify this option and the YAML file will instead be created in the location specified by the `-o` option.")
83-
8480
optional.add_argument("--salmonIndexOptions",
8581
help="Options to pass to salmon for index creation.",
8682
default=defaults["salmonIndexOptions"])

0 commit comments

Comments
 (0)