Mercurial > repos > florianbegusch > qiime2_suite
diff qiime2/qiime_tools_import.xml @ 14:a0a8d77a991c draft
Uploaded
author | florianbegusch |
---|---|
date | Thu, 03 Sep 2020 09:51:29 +0000 |
parents | f190567fe3f6 |
children |
line wrap: on
line diff
--- a/qiime2/qiime_tools_import.xml Thu Sep 03 09:46:00 2020 +0000 +++ b/qiime2/qiime_tools_import.xml Thu Sep 03 09:51:29 2020 +0000 @@ -19,13 +19,14 @@ #def is_fastq($f_test) #set $f = open($f_test, 'rb') + #set $fastq = str($f.readline()[0]) #if str($f.readline()[0]) == '@' #$f.close() #return True #end if #$f.close() - #return False + #return $fastq #end def @@ -34,33 +35,36 @@ ## 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)) + #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; + gzip -c ${f} > $file_for_processing; + ##echo $is_fastq_file; #else #set $file_for_processing = "'input/" + $f.name + "'" - ln -s ${f} $file_for_processing; + ln -s ${f} $file_for_processing; + ##echo $is_fastq_file; #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") + #set $cwf = str($outputpath.extra_files_path) + "_manifest_file.txt" + #set $tt = str("sample-id,absolute-filepath,direction") + echo $tt >> $cwf; #for $f in $input_type.list_list: - $m_file.write(str($f.name).split("_")[0]+",$PWD/input/"+str($f.name)+".gz,forward\n") + #set $tt = str($f.name).split("_")[0]+",$PWD/input/"+str($f.name).split(".")[0]+".fastq.gz,forward\n" + echo $tt >> $cwf; #end for - $m_file.close() - #set $in_= str($cwd) + + #set $in_= str($cwf) #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") + #set $cwf = str($outputpath.extra_files_path) + "_manifest_file.txt" + #set $tt = str("sample-id,absolute-filepath,direction") + echo $tt >> $cwf; #for $pair in $input_type.list_paired_collection: #set $forward_is_fastq_file = $is_fastq(str($pair.forward)) @@ -68,29 +72,36 @@ #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") + #set $tt = str($pair.name).split("_")[0]+",$PWD/input/"+str($pair.name)+"_R1_001.fastq.gz,forward\n" + echo $tt >> $cwf; #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") + #set $tt = str($pair.name).split("_")[0]+",$PWD/input/"+str($pair.name)+"_R1_001.fastq.gz,forward\n" + echo $tt >> $cwf; #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") + #set $tt = str($pair.name).split("_")[0]+",$PWD/input/"+str($pair.name)+"_R2_001.fastq.gz,reverse\n" + echo $tt >> $cwf; #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") + #set $tt = str($pair.name).split("_")[0]+",$PWD/input/"+str($pair.name)+"_R2_001.fastq.gz,reverse\n" + echo $tt >> $cwf; #end if #end for - $m_file.close() - #if 'PairedEndFastqManifestPhred' in str($inputformat): - #set $in_= str($cwd) + + #if 'PairedEndFastqManifestPhred' in str($inputformat) or 'SingleEndFastqManifestPhred33V2' in str($inputformat) or 'SingleEndFastqManifestPhred33' in str($inputformat): + + #set $in_= str($cwf) + #elif 'Casava' in str($inputformat): #set $in_= 'input' #end if + #else #set $res = $is_fastq(str($file)) @@ -268,9 +279,9 @@ <outputs> <data format="qza" label="${tool.name} on ${on_string}: outputpath.qza" name="outputpath"/> </outputs> - <stdio> + <!--<stdio> <exit_code range="2" level="warning" description="Error" /> - </stdio> + </stdio>--> <help> </help> <macros>