public class GtfReporterImporter extends ReporterFlatFileImporter implements WrappedConfigureByExample
ReporterFlatFileImporter
but uses a GtfInputStream
as a wrapper to generate a pure column-based output which can be used
by the regular tools for file parsing. The importer will also skip
lines with a non-unique transcript_id+seqname.
The default configuration is to use the transcript_id+seqname as the reporter id and name. gene_id is stored as "gene symbol" and seqname as "chromosome". The default configuration can be changed by user configurations depending on what additional attributes that are present in the GTF file.
Plugin.MainType
Modifier and Type | Field and Description |
---|---|
private InputStreamTracker |
tracker
Needed for progress reporting since reading from the source
will produce less bytes when wrapped.
|
reporterIsUsedErrorParameter
complexMappings, dataFooterRegexpParameter, dataHeaderRegexpParameter, dataSplitterRegexpParameter, defaultErrorParameter, errorSection, fileParameter, fileType, headerRegexpParameter, ignoreRegexpParameter, invalidUseOfNullErrorParameter, mappingSection, maxDataColumnsParameter, minDataColumnsParameter, numberFormatErrorParameter, numberOutOfRangeErrorParameter, numDataColumnsType, optionalRegexpType, parserSection, requiredRegexpType, sectionRegexpParameter, stringTooLongErrorParameter, trimQuotesParameter
annotationSection, configuration, COPY_ANNOTATIONS, job, OVERWRITE_ANNOTATIONS, sc
Constructor and Description |
---|
GtfReporterImporter() |
Modifier and Type | Method and Description |
---|---|
protected long |
getNumBytes(FlatFileParser ffp)
Get the number of bytes read from the original file.
|
void |
init(SessionControl sc,
ParameterValues configuration,
ParameterValues job)
Store copies of the session control, plugin and job configuration.
|
InputStream |
wrapInputStream(InputStream in)
Wrap the input stream with a
GtfInputStream . |
begin, beginData, configure, end, getGuiContexts, getPermissions, getRequestInformation, getSuccessMessage, handleData, isInContext, requiresConfiguration, supportsConfigurations
addErrorHandler, checkColumnMapping, checkColumnMapping, continueWithNextFileAfterError, doImport, finish, getCharset, getCharset, getDecimalSeparator, getErrorHandler, getErrorOption, getFileIterator, getInitializedFlatFileParser, getMainType, getMapper, getMapper, getNumberFormat, getProgress, getSignalHandler, getTotalFileSize, handleHeader, handleSection, isImportable, isImportable, log, log, log, log, run, setUpErrorHandling, start
cloneParameterWithDefaultValue, closeLogFile, createLogFile, done, getCopyAnnotationsParmeter, getCurrentConfiguration, getCurrentJob, getJobOrConfigurationValue, getOverwriteAnnotationsParameters, log, log, storeValue, storeValue, storeValues, validateRequestParameters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
done, getMainType, getPermissions, requiresConfiguration, run, supportsConfigurations
private InputStreamTracker tracker
public void init(SessionControl sc, ParameterValues configuration, ParameterValues job) throws BaseException
AbstractPlugin
AbstractPlugin.sc
, AbstractPlugin.configuration
and AbstractPlugin.job
variables. If a subclass overrides this method it is
recommended that it also calls super.init(sc, configuration, job)
.init
in interface Plugin
init
in class AbstractPlugin
sc
- A SessionControl
object that the plugin
can use to communicate with the core.configuration
- The configuration parameters for the pluginjob
- The job parameters for the pluginBaseException
- if there is an error.public InputStream wrapInputStream(InputStream in) throws IOException
GtfInputStream
.wrapInputStream
in interface WrappedConfigureByExample
wrapInputStream
in class AbstractFlatFileImporter
in
- The input stream to wrapIOException
- If there is an errorAbstractFlatFileImporter.getNumBytes(FlatFileParser)
protected long getNumBytes(FlatFileParser ffp)
getNumBytes
in class AbstractFlatFileImporter
ffp
- The file parser that is used to parsed the fileAbstractFlatFileImporter.wrapInputStream(InputStream)
,
AbstractFlatFileImporter.getProgress(FlatFileParser)