# HG changeset patch
# User iuc
# Date 1733381380 0
# Node ID 71c994a11f71ef37167acf5df00c0fa87e52ff42
# Parent d63c1442407f0a55d4e29ccbf57104697f70f1f1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_star_index_builder commit 57d05675396f0b44265fb4dbc8f9f891c6073219
diff -r d63c1442407f -r 71c994a11f71 data_manager/macros.xml
--- a/data_manager/macros.xml Sun Apr 16 08:31:33 2023 +0000
+++ b/data_manager/macros.xml Thu Dec 05 06:49:40 2024 +0000
@@ -4,8 +4,8 @@
The data manager uses a symlink to this macro file to keep the STAR and
the index versions in sync, but you should manually update @IDX_VERSION_SUFFIX@ -->
- 2.7.10b
- 3
+ 2.7.11a
+ 1
21.01
2.7.4a
- 1
+ 3
rnastar_index2x_versioned
-
star
- samtools
- gzip
-
+ samtools
+ gzip
+
-
topic_3170
@@ -36,20 +34,16 @@
operation_0292
-
-
+
-
-
-
-
+
+
+
+
-
--readFilesCommand zcat
@@ -59,8 +53,9 @@
-
-
+
+
+
@@ -79,7 +74,7 @@
-
+
@@ -103,15 +98,17 @@
#if str($refGenomeSource.GTFconditional.GTFselect) == 'with-gtf':
--sjdbOverhang '${refGenomeSource.GTFconditional.sjdbOverhang}'
--sjdbGTFfile '${refGenomeSource.GTFconditional.sjdbGTFfile}'
+ --sjdbGTFfeatureExon '${refGenomeSource.GTFconditional.sjdbGTFfeatureExon}'
#if str($refGenomeSource.GTFconditional.sjdbGTFfile.ext) == 'gff3':
--sjdbGTFtagExonParentTranscript Parent
#end if
#end if
#else:
- ## ref genome selection is less complex for STARsolo cause
+ ## ref genome selection is less complex for STARsolo because
## with-gtf is mandatory there
--sjdbOverhang '${refGenomeSource.sjdbOverhang}'
--sjdbGTFfile '${refGenomeSource.sjdbGTFfile}'
+ --sjdbGTFfeatureExon '${refGenomeSource.sjdbGTFfeatureExon}'
#if str($refGenomeSource.sjdbGTFfile.ext) == 'gff3':
--sjdbGTFtagExonParentTranscript Parent
#end if
@@ -119,13 +116,20 @@
#if str($refGenomeSource.genomeSAindexNbases):
--genomeSAindexNbases ${refGenomeSource.genomeSAindexNbases}
#end if
+ ## Diploid mode
+ #if 'diploidconditional' in $refGenomeSource:
+ #if str($refGenomeSource.diploidconditional.diploid) == 'Yes':
+ --genomeTransformVCF '${refGenomeSource.diploidconditional.genomeTransformVCF}'
+ --genomeTransformType Diploid
+ #end if
+ #end if
--runThreadN \${GALAXY_SLOTS:-4}
## in bytes
--limitGenomeGenerateRAM \$((\${GALAXY_MEMORY_MB:-31000} * 1000000))
&&
#end if
]]>
-
-
-
-
-
+
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
+
-
-
-
-
+
+
+
+
-
+
-
+
-
-
+
+
@@ -233,16 +236,16 @@
-
-
+
+
-
-
-
+
+
+
-
+
@@ -254,11 +257,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -273,14 +276,14 @@
-
+
@@ -293,7 +296,7 @@
-
+
@@ -341,73 +344,92 @@
outWig['outWigType'] != "None"
-
+
-
+
outWig['outWigType'] != "None"
-
+
-
+
outWig['outWigType'] != "None" and outWig['outWigStrand']
-
+
-
+
outWig['outWigType'] != "None" and outWig['outWigStrand']
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+ - vW:i:2 = multi-mapping read
+ - vW:i:3 = variant base in the read is N (non-ACGT)
+ - vW:i:4 = remapped read did not map
+ - vW:i:5 = remapped read multi-maps
+ - vW:i:6 = remapped read maps to a different locus
+ - vW:i:7 = read overlaps too many variants
+ ]]>
+
+
+
+
+
+
+
+
+
diff -r d63c1442407f -r 71c994a11f71 data_manager/rna_star_index_builder.py
--- a/data_manager/rna_star_index_builder.py Sun Apr 16 08:31:33 2023 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-
-import argparse
-import json
-
-
-def main():
- parser = argparse.ArgumentParser()
- parser.add_argument('--config-file')
- parser.add_argument('--value')
- parser.add_argument('--dbkey')
- parser.add_argument('--name')
- parser.add_argument('--subdir')
- parser.add_argument('--data-table')
- parser.add_argument('--with-gene-model', action='store_true')
- parser.add_argument('--index-version')
-
- args = parser.parse_args()
-
- if args.dbkey in [None, '', '?']:
- raise Exception(
- '"%s" is not a valid dbkey. You must specify a valid dbkey.'
- % (args.dbkey)
- )
-
- with_gene_model = "0"
- if args.with_gene_model:
- with_gene_model = "1"
-
- data_manager_dict = {
- 'data_tables': {
- args.data_table: [
- {
- "value": args.value,
- "dbkey": args.dbkey,
- "name": args.name,
- "path": args.subdir,
- "with_gene_model": with_gene_model,
- "version": args.index_version
- }
- ]
- }
- }
- with open(args.config_file, 'w') as fh:
- json.dump(data_manager_dict, fh, sort_keys=True)
-
-
-if __name__ == "__main__":
- main()
diff -r d63c1442407f -r 71c994a11f71 data_manager/rna_star_index_builder.xml
--- a/data_manager/rna_star_index_builder.xml Sun Apr 16 08:31:33 2023 +0000
+++ b/data_manager/rna_star_index_builder.xml Thu Dec 05 06:49:40 2024 +0000
@@ -1,15 +1,15 @@
-
+
builder
macros.xml
-
- python
-
+
' '${all_fasta_source.fields.path}' | tr -d '\n' | wc -c)" &&
+echo "Bases in reference: \$nbases" &&
+#end if
+
+#if $auto_sa_index_nbases:
+saindex_nbases=\$((\$(log2 \$nbases) / 2 - 1)) &&
+[[ \$saindex_nbases -lt 14 ]] || saindex_nbases=14 &&
+#else if $advanced_options.advanced_options_selector == "advanced":
+saindex_nbases=${advanced_options.genomeSAindexNbases} &&
+#end if
+
+#if $auto_chr_bin_nbits:
+nseqs="\$(grep -c '>' '${all_fasta_source.fields.path}')" &&
+echo "Sequences in reference: \$nseqs" &&
+chr_bin_nbits=\$((\$(log2 \$nbases) / \$(log2 \$nseqs))) &&
+[[ \$chr_bin_nbits -lt 18 ]] || chr_bin_nbits=18 &&
+#else if $advanced_options.advanced_options_selector == "advanced":
+chr_bin_nbits=${advanced_options.genomeChrBinNbits} &&
+#end if
+
STAR
--runMode genomeGenerate
--genomeFastaFiles '${all_fasta_source.fields.path}'
@@ -31,29 +52,52 @@
--sjdbGTFfile '${GTFconditional.sjdbGTFfile}'
--sjdbOverhang ${GTFconditional.sjdbOverhang}
#end if
+#if $advanced_options.advanced_options_selector == "advanced" or $auto_sa_index_nbases:
+ --genomeSAindexNbases "\$saindex_nbases"
+#end if
+#if $advanced_options.advanced_options_selector == "advanced" or $auto_chr_bin_nbits:
+ --genomeChrBinNbits "\$chr_bin_nbits"
+#end if
#if $advanced_options.advanced_options_selector == "advanced":
- --genomeSAindexNbases ${advanced_options.genomeSAindexNbases}
- --genomeChrBinNbits ${advanced_options.genomeChrBinNbits}
--genomeSAsparseD ${advanced_options.genomeSAsparseD}
#end if
--runThreadN \${GALAXY_SLOTS:-2} &&
-python '${__tool_directory__}/rna_star_index_builder.py'
---config-file '${out_file}'
---value '${all_fasta_source.fields.value}'
---dbkey '${all_fasta_source.fields.dbkey}'
---index-version '@IDX_VERSION@'
-#if $name:
- --name '$name'
-#else
- --name '${all_fasta_source.fields.name}'
-#end if
-#if str($GTFconditional.GTFselect) == "withGTF":
- --with-gene-model
-#end if
---data-table @IDX_DATA_TABLE@
---subdir '${subdir}'
+cp '$dmjson' '$out_file'
]]>
+
+ > 1))
+ log2=\$((log2 + 1))
+ done
+ [[ \$log2 -gt 0 ]] && echo \$log2 || echo 1
+}
+]]>
+
+
@@ -71,6 +115,12 @@
+
+
@@ -90,7 +140,8 @@
of contigs, it is recommended to scale this parameter as min(18,
log2[max(GenomeLength/NumberOfReferences,ReadLength)]). For example, for 3 gigaBase
genome with 100,000 chromosomes/scaffolds, this is equal to 15."/>
-
@@ -104,11 +155,16 @@
-
-
-
-
-
+
+
+
+
+
+
diff -r d63c1442407f -r 71c994a11f71 data_manager_conf.xml
--- a/data_manager_conf.xml Sun Apr 16 08:31:33 2023 +0000
+++ b/data_manager_conf.xml Thu Dec 05 06:49:40 2024 +0000
@@ -12,9 +12,9 @@
out_file.extra_files_path is used as base by default
if no source, eg for type=directory, then refers to base
-->
- rnastar/${version}/${dbkey}/${value}/${path}
+ genomes/${dbkey}/rnastar_index/v${version}/${value}
- ${GALAXY_DATA_MANAGER_DATA_PATH}/rnastar/${version}/${dbkey}/${value}/${path}
+ ${GALAXY_DATA_MANAGER_DATA_PATH}/genomes/${dbkey}/rnastar_index/v${version}/${value}
abspath
diff -r d63c1442407f -r 71c994a11f71 test-data/rnastar_index2_versioned.loc
diff -r d63c1442407f -r 71c994a11f71 test-data/rnastar_index2x_versioned.loc
diff -r d63c1442407f -r 71c994a11f71 test-data/test_star_01.data_manager_json
--- a/test-data/test_star_01.data_manager_json Sun Apr 16 08:31:33 2023 +0000
+++ b/test-data/test_star_01.data_manager_json Thu Dec 05 06:49:40 2024 +0000
@@ -1,1 +1,14 @@
-{"data_tables": {"rnastar_index2x_versioned": \[{"dbkey": "phiX174", "name": "phiX174", "path": ".*", "value": "phiX174", "version": "2.7.4a", "with_gene_model": "0"}\]}}
+{
+ "data_tables":{
+ "rnastar_index2x_versioned":[
+ {
+ "value": "phiX174",
+ "dbkey": "phiX174",
+ "name": "phiX174",
+ "path": "SA",
+ "with_gene_model": "0",
+ "version": "2.7.4a"
+ }
+ ]
+ }
+}
diff -r d63c1442407f -r 71c994a11f71 tool_data_table_conf.xml.test
--- a/tool_data_table_conf.xml.test Sun Apr 16 08:31:33 2023 +0000
+++ b/tool_data_table_conf.xml.test Thu Dec 05 06:49:40 2024 +0000
@@ -5,8 +5,8 @@
-
+
value, dbkey, name, path, with_gene_model, version
-
+