FilterSubfeatures

From ZENBU documentation wiki
Jump to: navigation, search

Data Stream Processing > Processing Modules > General manipulation Modules

Description

The FilterSubfeatures processing module is designed to work on Features with subfeatures to remove subfeatures not specified in the category filtering and then rebuild the outer feature boundaries based on the remaining subfeatures. The module will resort features on the data stream as needed to preserve the stream integrity.

Parameters

  • <category_filter> : defines the subfeatures which are retained in the rebuilt primary feature.

Example

This script combines two CalcInterSubfeatures modules with a FilterSubfeatures module to manipulate a complex gene model of exons and UTRs into a new gene model based on coding exons. It first creates intron features between the exons which might be labeled either as block or exon. The second CalcInterSubfeatures then uses 5utr and 3utr and intron as demarkation to create codingexon subfeatures. Lastly the FilterSubfeatures rebuilds the transcript gene model using only these codingexon subfeatures.

<zenbu_script>
  <stream_queue>
		<spstream module="CalcInterSubfeatures">
			<category_filter>block</category_filter>
			<category_filter>exon</category_filter>
			<new_subfeature_category>intron</new_subfeature_category>
		</spstream>
		<spstream module="CalcInterSubfeatures">
			<category_filter>5utr</category_filter>
			<category_filter>3utr</category_filter>
			<category_filter>intron</category_filter>
			<new_subfeature_category>codingexon</new_subfeature_category>
		</spstream>
		<spstream module="FilterSubfeatures">
			<category_filter>codingexon</category_filter>
		</spstream>
	</stream_queue>
</zenbu_script>

Here is a ZENBU view showing this script in use
http://fantom.gsc.riken.jp/zenbu/gLyphs/#config=adzrWGcdF1GoZMET-n_LRC;loc=hg19::chr8:128746973..128755020