view qiime2/qiime_feature-classifier_fit-classifier-naive-bayes.xml @ 9:f190567fe3f6 draft

Uploaded
author florianbegusch
date Wed, 14 Aug 2019 15:12:48 -0400
parents de4c22a52df4
children 21c7954105a9
line wrap: on
line source

<?xml version="1.0" ?>
<tool id="qiime_feature-classifier_fit-classifier-naive-bayes" name="qiime feature-classifier fit-classifier-naive-bayes" version="2019.7">
	<description> - Train the naive_bayes classifier</description>
	<requirements>
		<requirement type="package" version="2019.7">qiime2</requirement>
	</requirements>
	<command><![CDATA[


#if str( $id_to_taxonomy_fp.selector ) == 'history'
	#set $tax = $id_to_taxonomy_fp.taxonomy_fp
#else:
	#set $tax_path = $id_to_taxonomy_fp.taxonomy_fp.fields.path
	qiime tools import --type 'FeatureData[Taxonomy]'  --source-format HeaderlessTSVTaxonomyFormat --input-path $tax_path --output-path ref-taxonomy.qza;
	#set $tax='ref-taxonomy.qza'
#end if


qiime feature-classifier fit-classifier-naive-bayes


--i-reference-taxonomy '$tax'


--i-reference-reads=$ireferencereads

#if str($iclassweight) != 'None':
 --i-class-weight=$iclassweight
#end if

#if str($pclassifyalpha):
 --p-classify--alpha=$pclassifyalpha
#end if

#if str($pclassifychunksize):
 --p-classify--chunk-size=$pclassifychunksize
#end if




#if '__sq__' in str($pclassifyclassprior):
  #set $pclassifyclassprior_temp = $pclassifyclassprior.replace('__sq__', "'")
  #set $pclassifyclassprior = $pclassifyclassprior_temp
#end if

#if str($pclassifyclassprior):
 --p-classify--class-prior="$pclassifyclassprior"
#end if




#if $pclassifyfitprior:
 --p-classify--fit-prior
#end if

#if $pfeatextalternatesign:
 --p-feat-ext--alternate-sign
#end if





#if '__sq__' in str($pfeatextanalyzer):
  #set $pfeatextanalyzer_temp = $pfeatextanalyzer.replace('__sq__', "'")
  #set $pfeatextanalyzer = $pfeatextanalyzer_temp
#end if

#if str($pfeatextanalyzer):
 --p-feat-ext--analyzer="$pfeatextanalyzer"
#end if





#if $pfeatextbinary:
 --p-feat-ext--binary
#end if



#if '__sq__' in str($pfeatextdecodeerror):
  #set $pfeatextdecodeerror_temp = $pfeatextdecodeerror.replace('__sq__', "'")
  #set $pfeatextdecodeerror = $pfeatextdecodeerror_temp
#end if

#if str($pfeatextdecodeerror):
 --p-feat-ext--decode-error="$pfeatextdecodeerror"
#end if





#if '__sq__' in str($pfeatextencoding):
  #set $pfeatextencoding_temp = $pfeatextencoding.replace('__sq__', "'")
  #set $pfeatextencoding = $pfeatextencoding_temp
#end if

#if str($pfeatextencoding):
 --p-feat-ext--encoding="$pfeatextencoding"
#end if





#if '__sq__' in str($pfeatextinput):
  #set $pfeatextinput_temp = $pfeatextinput.replace('__sq__', "'")
  #set $pfeatextinput = $pfeatextinput_temp
#end if

#if str($pfeatextinput):
 --p-feat-ext--input="$pfeatextinput"
#end if




#if $pnofeatextlowercase:
 --p-no-feat-ext--lowercase
#end if

#if str($pfeatextnfeatures):
 --p-feat-ext--n-features=$pfeatextnfeatures
#end if




#if '__sq__' in str($pfeatextngramrange):
  #set $pfeatextngramrange_temp = $pfeatextngramrange.replace('__sq__', "'")
  #set $pfeatextngramrange = $pfeatextngramrange_temp
#end if

#if '__ob__' in str($pfeatextngramrange):
  #set $pfeatextngramrange_temp = $pfeatextngramrange.replace('__ob__', '[')
  #set $pfeatextngramrange = $pfeatextngramrange_temp
#end if
#if 'X' in str($pfeatextngramrange):
  #set $pfeatextngramrange_temp = $pfeatextngramrange.replace('X', '\\')
  #set $pfeatextngramrange = $pfeatextngramrange_temp
#end if

#if str($pfeatextngramrange):
 --p-feat-ext--ngram-range="$pfeatextngramrange"
#end if





#if $pfeatextnonnegative:
 --p-feat-ext--non-negative
#end if


#if '__sq__' in str($pfeatextnorm):
  #set $pfeatextnorm_temp = $pfeatextnorm.replace('__sq__', "'")
  #set $pfeatextnorm = $pfeatextnorm_temp
#end if

#if str($pfeatextnorm):
 --p-feat-ext--norm="$pfeatextnorm"
#end if




#if '__sq__' in str($pfeatextpreprocessor):
  #set $pfeatextpreprocessor_temp = $pfeatextpreprocessor.replace('__sq__', "'")
  #set $pfeatextpreprocessor = $pfeatextpreprocessor_temp
#end if

#if str($pfeatextpreprocessor):
 --p-feat-ext--preprocessor="$pfeatextpreprocessor"
#end if




#if '__sq__' in str($pfeatextstopwords):
  #set $pfeatextstopwords_temp = $pfeatextstopwords.replace('__sq__', "'")
  #set $pfeatextstopwords = $pfeatextstopwords_temp
#end if

#if str($pfeatextstopwords):
 --p-feat-ext--stop-words="$pfeatextstopwords"
#end if





#if '__sq__' in str($pfeatextstripaccents):
  #set $pfeatextstripaccents_temp = $pfeatextstripaccents.replace('__sq__', "'")
  #set $pfeatextstripaccents = $pfeatextstripaccents_temp
#end if

#if str($pfeatextstripaccents):
 --p-feat-ext--strip-accents="$pfeatextstripaccents"
#end if






#if '__sq__' in str($pfeatexttokenpattern):
  #set $pfeatexttokenpattern_temp = $pfeatexttokenpattern.replace('__sq__', "'")
  #set $pfeatexttokenpattern = $pfeatexttokenpattern_temp
#end if

#if '__ob__' in str($pfeatexttokenpattern):
  #set $pfeatexttokenpattern_temp = $pfeatexttokenpattern.replace('__ob__', '[')
  #set $pfeatexttokenpattern = $pfeatexttokenpattern_temp
#end if

#if 'X' in str($pfeatexttokenpattern):
  #set $pfeatexttokenpattern_temp = $pfeatexttokenpattern.replace('X', '\\')
  #set $pfeatexttokenpattern = $pfeatexttokenpattern_temp
#end if

#if str($pfeatexttokenpattern):
 --p-feat-ext--token-pattern="$pfeatexttokenpattern"
#end if





#if '__sq__' in str($pfeatexttokenizer):
  #set $pfeatexttokenizer_temp = $pfeatexttokenizer.replace('__sq__', "'")
  #set $pfeatexttokenizer = $pfeatexttokenizer_temp
#end if

#if str($pfeatexttokenizer):
 --p-feat-ext--tokenizer="$pfeatexttokenizer"
#end if

--o-classifier=oclassifier
;
cp oclassifier.qza $oclassifier
	]]></command>
	<inputs>
		<param format="qza,no_unzip.zip" label="--i-reference-reads: ARTIFACT FeatureData[Sequence] [required]" name="ireferencereads" optional="False" type="data"/>
		<param format="qza,no_unzip.zip" label="--i-class-weight: ARTIFACT FeatureTable[RelativeFrequency] [optional]" name="iclassweight" optional="True" type="data"/>

		<conditional name="id_to_taxonomy_fp" optional="True">
		   <param name="selector" type="select" label="Reference taxonomy to query">
			  <option value="cached">Public databases</option>
			  <option value="history">Databases from your history</option>
		   </param>
		   <when value="cached">
			  <param argument="--taxonomy_fp" label="Reference taxonomy" type="select" optional="True">
				 <options from_data_table="qiime_taxonomy" />
			  </param>
		   </when>
		   <when value="history">
			  <param argument="--taxonomy_fp" type="data" format="qza,no_unzip.zip" label="Reference databases" optional="True" />
		   </when>
		</conditional>

		<param label="--p-classify--alpha: NUMBER [default: 0.001]" name="pclassifyalpha" optional="True" type="float" value="0.001"/>
		<param label="--p-classify--chunk-size: INTEGER [default: 20000]" name="pclassifychunksize" optional="True" type="integer" value="20000"/>
		<param label="--p-classify--class-prior: TEXT [default: 'null']" name="pclassifyclassprior" optional="True" type="text" value="null"/>
		<param label="--p-classify--fit-prior: --p-no-classify--fit-prior [default: False]" name="pclassifyfitprior" selected="False" type="boolean"/>
		<param label="--p-feat-ext--alternate-sign: --p-no-feat-ext--alternate-sign [default: False]" name="pfeatextalternatesign" selected="False" type="boolean"/>
		<param label="--p-feat-ext--analyzer: TEXT [default: 'char_wb']" name="pfeatextanalyzer" optional="True" type="text" value="char_wb"/>
		<param label="--p-feat-ext--binary: --p-no-feat-ext--binary [default: False]" name="pfeatextbinary" selected="False" type="boolean"/>
		<param label="--p-feat-ext--decode-error: TEXT [default: 'strict']" name="pfeatextdecodeerror" optional="True" type="text" value="strict"/>
		<param label="--p-feat-ext--encoding: TEXT [default: 'utf-8']" name="pfeatextencoding" optional="True" type="text" value="utf-8"/>
		<param label="--p-feat-ext--input: TEXT [default: 'content']" name="pfeatextinput" optional="True" type="text" value="content"/>
		<param label="--p-no-feat-ext--lowercase:  [default: False]" name="pnofeatextlowercase" selected="False" type="boolean"/>
		<param label="--p-feat-ext--n-features: INTEGER [default: 8192]" name="pfeatextnfeatures" optional="True" type="integer" value="8192"/>
		<param label="--p-feat-ext--ngram-range: TEXT [default: '[7, 7]']" name="pfeatextngramrange" optional="True" type="text" value="[7, 7]"/>
		<param label="--p-feat-ext--non-negative: --p-no-feat-ext--non-negative [default: False]" name="pfeatextnonnegative" selected="False" type="boolean"/>
		<param label="--p-feat-ext--norm: TEXT [default: 'l2']" name="pfeatextnorm" optional="True" type="text" value="l2"/>
		<param label="--p-feat-ext--preprocessor: TEXT [default: 'null']" name="pfeatextpreprocessor" optional="True" type="text" value="null"/>
		<param label="--p-feat-ext--stop-words: TEXT [default: 'null']" name="pfeatextstopwords" optional="True" type="text" value="null"/>
		<param label="--p-feat-ext--strip-accents: TEXT [default: 'null']" name="pfeatextstripaccents" optional="True" type="text" value="null"/>
		<param label="--p-feat-ext--token-pattern: TEXT [default: '(?u)\\b\\w\\w+\\b']" name="pfeatexttokenpattern" optional="True" type="text" value="(?u)\\b\\w\\w+\\b"/>
		<param label="--p-feat-ext--tokenizer: TEXT [default: 'null']" name="pfeatexttokenizer" optional="True" type="text" value="null"/>
	</inputs>
	<outputs>
		<data format="qza" label="${tool.name} on ${on_string}: classifier.qza" name="oclassifier"/>
	</outputs>
	<help><![CDATA[
Train the naive_bayes classifier
################################

Create a scikit-learn naive_bayes classifier for reads

Parameters
----------
reference_reads : FeatureData[Sequence]
	\

reference_taxonomy : FeatureData[Taxonomy]
	\

class_weight : FeatureTable[RelativeFrequency], optional
	\

classify__alpha : Float, optional
	\

classify__chunk_size : Int, optional
	\

classify__class_prior : Str, optional
	\

classify__fit_prior : Bool, optional
	\

feat_ext__alternate_sign : Bool, optional
	\

feat_ext__analyzer : Str, optional
	\

feat_ext__binary : Bool, optional
	\

feat_ext__decode_error : Str, optional
	\

feat_ext__encoding : Str, optional
	\

feat_ext__input : Str, optional
	\

feat_ext__lowercase : Bool, optional
	\

feat_ext__n_features : Int, optional
	\

feat_ext__ngram_range : Str, optional
	\

feat_ext__non_negative : Bool, optional
	\

feat_ext__norm : Str, optional
	\

feat_ext__preprocessor : Str, optional
	\

feat_ext__stop_words : Str, optional
	\

feat_ext__strip_accents : Str, optional
	\

feat_ext__token_pattern : Str, optional
	\

feat_ext__tokenizer : Str, optional
	\

Returns
-------
classifier : TaxonomicClassifier
	\

	]]></help>
<macros>
    <import>qiime_citation.xml</import>
</macros>
<expand macro="qiime_citation"/>
</tool>