| Miscellaneous |
| Version lineage of this tool (guids ordered most recent to oldest) |
| toolshed.g2.bx.psu.edu/repos/florianbegusch/qiime2_wrappers/qiime_tools_import/2019.4 (this tool) |
| toolshed.g2.bx.psu.edu/repos/florianbegusch/qiime2_wrappers/qiime_tools_import/2018.4 |
| qiime_tools_import |
| Requirements (dependencies defined in the <requirements> tag set) |
| name | version | type |
| qiime2 | 2019.4 | package |
| Additional information about this tool |
mkdir input;
#set $in_= 'input'
#if '__ob__' in str($semantic_type):
#set $type_temp = str($semantic_type).replace('__ob__', '[')
#set $type_temp = str($type_temp).replace('__cb__', ']')
#set $semantic_type = $type_temp
#end if
#def is_fastq($f_test)
#set $f = open($f_test, 'rb')
#if str($f.readline()[0]) == '@'
#$f.close()
#return True
#end if
#$f.close()
#return False
#end def
## Symlinks creation or On the fly creation of a combo file
#if $input_type.type == 'list_list'
## Symlinks creation or On the fly creation of a combo file
#for $f in $input_type.list_list:
#set $is_fastq_file = $is_fastq(str($f))
#if $is_fastq_file:
#set $file_for_processing = "'input/" + $f.name + '.gz' + "'"
gzip -c ${f} > $file_for_processing;
#else
#set $file_for_processing = "'input/" + $f.name + "'"
ln -s ${f} $file_for_processing;
#end if
#end for
#if 'SingleEndFastqManifestPhred' in str($inputformat):
#set $cwd = str($outputpath.extra_files_path) + "_manifest_file.txt"
#set $m_file = open(str($cwd), 'w')
$m_file.write("sample-id,absolute-filepath,direction\n")
#for $f in $input_type.list_list:
$m_file.write(str($f.name).split("_")[0]+",$PWD/input/"+str($f.name)+".gz,forward\n")
#end for
$m_file.close()
#set $in_= str($cwd)
#end if
#elif $input_type.type == 'list_paired_collection':
#set $cwd = str($outputpath.extra_files_path) + "_manifest_file.txt"
#set $m_file = open(str($cwd), 'w')
$m_file.write("sample-id,absolute-filepath,direction\n")
#for $pair in $input_type.list_paired_collection:
#set $forward_is_fastq_file = $is_fastq(str($pair.forward))
#set $reverse_is_fastq_file = $is_fastq(str($pair.reverse))
#if $forward_is_fastq_file:
gzip -c ${pair.forward} > input/${pair.name}_R1_001.fastq.gz;
$m_file.write(str($pair.name).split("_")[0]+",$PWD/input/"+str($pair.name)+"_R1_001.fastq.gz,forward\n")
#else
ln -s ${pair.forward} input/${pair.name}_R1_001.fastq.gz;
$m_file.write(str($pair.name).split("_")[0]+",$PWD/input/"+str($pair.name)+"_R1_001.fastq.gz,forward\n")
#end if
#if $reverse_is_fastq_file:
gzip -c ${pair.reverse} > input/${pair.name}_R2_001.fastq.gz;
$m_file.write(str($pair.name).split("_")[0]+",$PWD/input/"+str($pair.name)+"_R2_001.fastq.gz,reverse\n")
#else
ln -s ${pair.reverse} input/${pair.name}_R2_001.fastq.gz;
$m_file.write(str($pair.name).split("_")[0]+",$PWD/input/"+str($pair.name)+"_R2_001.fastq.gz,reverse\n")
#end if
#end for
$m_file.close()
#if 'PairedEndFastqManifestPhred' in str($inputformat):
#set $in_= str($cwd)
#elif 'Casava' in str($inputformat):
#set $in_= 'input'
#end if
#else
#set $res = $is_fastq(str($file))
#if $res
gzip -c ${file} > ${file.name}.gz;
#set $in_= $file.name + '.gz'
#else
#set $in_= str($file)
#end if
#if "MultiplexedSingleEndBarcodeInSequence" in str($semantic_type):
mv *_R1_* forward.fastq.gz;
#set $in_= 'forward.fastq.gz';
#end if
#end if
## rename files to predefined names for "MultiplexedPairedEndBarcodeInSequence"
#if "MultiplexedPairedEndBarcodeInSequence" in str($semantic_type):
mv input/*_R1_* input/forward.fastq.gz;
mv input/*_R2_* input/reverse.fastq.gz;
#end if
qiime tools import
--input-path=$in_
#if str($inputformat) != 'None':
#if '__ob__' in str($inputformat):
#set $inputformat_temp = str($inputformat).replace('__ob__', '[')
#set $inputformat_temp = str($inputformat_temp).replace('__cb__', ']')
#set $inputformat = $inputformat_temp
#end if
--input-format="$inputformat"
#end if
--type="$semantic_type"
--output-path=outputpath.qza
;
cp outputpath.qza $outputpath
| Functional tests |