mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Move CONVERTER_fastq_to_fqtoc0 out of GALAXY_LIB_TOOLS_UNVERSIONED
This commit is contained in:
@@ -20,30 +20,26 @@ def main():
|
||||
"""
|
||||
input_fname = sys.argv[1]
|
||||
if is_gzip(input_fname):
|
||||
print('Conversion is only possible for uncompressed files')
|
||||
sys.exit(1)
|
||||
|
||||
out_file = open(sys.argv[2], 'w')
|
||||
sys.exit('Conversion is only possible for uncompressed files')
|
||||
|
||||
current_line = 0
|
||||
sequences = 1000000
|
||||
lines_per_chunk = 4 * sequences
|
||||
chunk_begin = 0
|
||||
|
||||
in_file = open(input_fname)
|
||||
with open(input_fname) as in_file, open(sys.argv[2], 'w') as out_file:
|
||||
out_file.write('{"sections" : [')
|
||||
|
||||
out_file.write('{"sections" : [')
|
||||
for line in in_file:
|
||||
current_line += 1
|
||||
if 0 == current_line % lines_per_chunk:
|
||||
chunk_end = in_file.tell()
|
||||
out_file.write('{"start":"%s","end":"%s","sequences":"%s"},' % (chunk_begin, chunk_end, sequences))
|
||||
chunk_begin = chunk_end
|
||||
|
||||
for line in in_file:
|
||||
current_line += 1
|
||||
if 0 == current_line % lines_per_chunk:
|
||||
chunk_end = in_file.tell()
|
||||
out_file.write('{"start":"%s","end":"%s","sequences":"%s"},' % (chunk_begin, chunk_end, sequences))
|
||||
chunk_begin = chunk_end
|
||||
|
||||
chunk_end = in_file.tell()
|
||||
out_file.write('{"start":"%s","end":"%s","sequences":"%s"}' % (chunk_begin, chunk_end, (current_line % lines_per_chunk) / 4))
|
||||
out_file.write(']}\n')
|
||||
chunk_end = in_file.tell()
|
||||
out_file.write('{"start":"%s","end":"%s","sequences":"%s"}' % (chunk_begin, chunk_end, (current_line % lines_per_chunk) / 4))
|
||||
out_file.write(']}\n')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<tool id="CONVERTER_fastq_to_fqtoc0" name="Convert FASTQ files to seek locations" version="1.0.0" hidden="true">
|
||||
<tool id="CONVERTER_fastq_to_fqtoc0" name="Convert FASTQ files to seek locations" version="1.0.1" hidden="true" profile="16.04">
|
||||
<requirements>
|
||||
<requirement type="package" version="19.09">galaxy-util</requirement>
|
||||
</requirements>
|
||||
<command>python '$__tool_directory__/fastq_to_fqtoc.py' '$input1' '$output1'</command>
|
||||
<inputs>
|
||||
<param format="fastq" name="input1" type="data" label="Choose FASTQ file"/>
|
||||
|
||||
@@ -144,7 +144,6 @@ GALAXY_LIB_TOOLS_UNVERSIONED = [
|
||||
"maf_by_block_number1",
|
||||
# Converters
|
||||
"CONVERTER_bed_to_fli_0",
|
||||
"CONVERTER_fastq_to_fqtoc0",
|
||||
"CONVERTER_gff_to_fli_0",
|
||||
"CONVERTER_gff_to_interval_index_0",
|
||||
"CONVERTER_maf_to_fasta_0",
|
||||
@@ -191,6 +190,7 @@ GALAXY_LIB_TOOLS_VERSIONED = {
|
||||
"wiggle2simple1": packaging.version.parse("1.0.1"),
|
||||
"CONVERTER_wiggle_to_interval_0": packaging.version.parse("1.0.1"),
|
||||
"aggregate_scores_in_intervals2": packaging.version.parse("1.1.4"),
|
||||
"CONVERTER_fastq_to_fqtoc0": packaging.version.parse("1.0.1"),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user