-
- All Implemented Interfaces:
-
java.lang.Runnable
,net.maizegenetics.plugindef.Plugin
,net.maizegenetics.plugindef.PluginListener
,net.maizegenetics.util.ProgressListener
public class SplitFastaByChromPlugin extends AbstractPlugin
Splits fasta by chromosome. IT assumes the id line has a chromosome of the form >1, >chr1 or >chromosome1 ALl of the above forms (case insensitive) will be written with an id line of just the number, e.g. >1 or >2 The "name" parameter is used as the basis of the name. To this name will be appended the "chr" and chrom number and .fa. For example: If the user gives "w22" as the name, the code will write files: w22chr1.fa, w22chr2.fa, etc. The isGca parameter: The assemblies starting with GCA have long text in the idLIne, with the chromosome stuck in the middle. This plugin will correctly parse these lines. OTher weird id lines are not supported and may need to be corrected manually before running through this plugin. Seems each set of assemblies that arrives has a different signature for the idline. So I keep customizing. Consider this code to the "base" plugin. On each run, if the idlines don't adhere to chr/chromosome/X or GCA, then user should run an altered version of this, or fix the idlines first.
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
DEFAULT_CITATION
public final static String
POSITION_LIST_NONE
public final static String
TAXA_LIST_NONE
-
Constructor Summary
Constructors Constructor Description SplitFastaByChromPlugin()
SplitFastaByChromPlugin(Frame parentFrame)
SplitFastaByChromPlugin(Frame parentFrame, boolean isInteractive)
-
Method Summary
Modifier and Type Method Description DataSet
processData(DataSet input)
String
parseChromosome(String chromString)
String
parseChromAsRomanNumerals(String chromString)
String
parseBauerFlint(String chromString)
String
parseChromFirstTab(String chromString)
String
parseGCA(String chromString)
static Integer
romanToDecimal(String romanNumber)
static int
processDecimal(int decimal, int lastNumber, int lastDecimal)
static void
main(Array<String> args)
ImageIcon
getIcon()
String
getButtonName()
String
getToolTipText()
String
fasta()
Fasta File to split by chromosome SplitFastaByChromPlugin
fasta(String value)
Set Fasta File . String
name()
Name to give each file, e.g w22. SplitFastaByChromPlugin
name(String value)
Set Name . String
outputDir()
Path to write the split files SplitFastaByChromPlugin
outputDir(String value)
Set Output Directory. Boolean
isGca()
GCA fastas have long text as idLines. SplitFastaByChromPlugin
isGca(Boolean value)
Set Is GCA. -
Methods inherited from class net.maizegenetics.plugindef.AbstractPlugin
addListener, cancel, convert, dataSetReturned, getCitation, getInputs, getListeners, getMenu, getPanel, getParameter, getParentFrame, getUsage, getUsageHTML, hasListeners, isInteractive, isPluginParameter, performFunction, pluginDescription, pluginParameters, pluginUserManualURL, progress, receiveInput, reverseTrace, run, setConfigParameters, setParameter, setParameters, setParametersToDefault, setThreaded, trace, usageParameters, wasCancelled
-
Methods inherited from class net.maizegenetics.plugindef.Plugin
getPluginInstance, isPlugin
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
processData
DataSet processData(DataSet input)
-
parseChromosome
String parseChromosome(String chromString)
-
parseChromAsRomanNumerals
String parseChromAsRomanNumerals(String chromString)
-
parseBauerFlint
String parseBauerFlint(String chromString)
-
parseChromFirstTab
String parseChromFirstTab(String chromString)
-
romanToDecimal
static Integer romanToDecimal(String romanNumber)
-
processDecimal
static int processDecimal(int decimal, int lastNumber, int lastDecimal)
-
getButtonName
String getButtonName()
-
getToolTipText
String getToolTipText()
-
fasta
SplitFastaByChromPlugin fasta(String value)
Set Fasta File . Fasta File to split by chromosome
- Parameters:
value
- Fasta File
-
name
String name()
Name to give each file, e.g w22. To this name will be appended 'chr' plus the chrom number plus .fa
-
name
SplitFastaByChromPlugin name(String value)
Set Name . Name to give each file, e.g w22. To this name will be appended 'chr' plus the chrom number plus .fa
- Parameters:
value
- Name
-
outputDir
SplitFastaByChromPlugin outputDir(String value)
Set Output Directory. Path to write the split files
- Parameters:
value
- Output Directory
-
isGca
Boolean isGca()
GCA fastas have long text as idLines. These fasta will have their id lines specially parsed to extract the chromosome number.
-
isGca
SplitFastaByChromPlugin isGca(Boolean value)
Set Is GCA. GCA fastas have long text as idLines. These fasta will have their id lines specially parsed to extract the chromosome number.
- Parameters:
value
- Is GCA
-
-
-
-