Example #1
0
 void defineParams()
 {
 	addUsageLine("Run commands in a text file in a parallel environment");
 	addUsageLine("+You may use the tag MPI_BARRIER to separate execution blocks.");
 	addUsageLine("+You may use the tag MPI_NEWLINE to force a line break (this is useful for programs accepting parameters directly from stdin).");
 	addParamsLine("-i <commandFile>    : File with commands in different lines");
 }
Example #2
0
// Params definition ============================================================
void ProgNmaAlignment::defineParams() {
	addUsageLine("Align images with an atomic or pseudo-atomic (from EM volume) structure by computing deformation amplitudes along normal modes, three Euler angles, and two in-plane shifts");
	addUsageLine("+See [[http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/Nma_alignment_v3][here]] for further information about the parameters of this program.");
	defaultComments["-i"].clear();
	defaultComments["-i"].addComment("Metadata with image filenames");
	defaultComments["-o"].clear();
	defaultComments["-o"].addComment("Metadata with output Euler angles, shifts, and deformation amplitudes");
	XmippMetadataProgram::defineParams();
	addParamsLine("   --pdb <PDB_filename>                : Reference atomic or pseudo-atomic structure in PDB format");
	addParamsLine("  [--odir <outputDir=\".\">]           : Output directory");
	addParamsLine("  [--resume]                           : Resume processing");
	addParamsLine("==Generation of the deformed reference volumes==");
	addParamsLine("   --modes <filename>                  : File with a list of mode filenames");
	addParamsLine("  [--sampling_rate <Ts=1>]             : Pixel size in Angstroms");
	addParamsLine("  [--filterVol <cutoff=15.>]           : Filter the volume after deforming. If this option is used, the default cut-off is 15 A.");
	addParamsLine("  [--centerPDB]                        : Center the PDB structure");
	addParamsLine("  [--fixed_Gaussian <std=-1>]          : For pseudo-atoms fixed_Gaussian must be used.");
	addParamsLine("                                       : Default standard deviation <std> is read from the PDB file.");
	addParamsLine("==Combined elastic and rigid-body alignment==");
	addParamsLine("  [--trustradius_scale <s=1>]          : Positive scaling factor to scale the initial trust region radius");
	addParamsLine("  [--mask <m=\"\">]                    : 2D masking  of the projections of the deformed volume");
	addParamsLine("  [--projMatch]                        : Real-space instead of wavelet-space (default) projection matching (global matching) that is refined by local (Fourier central slice) projection matching");
	addParamsLine("                                       :+Note that wavelet-based method needs the image size to be power of 2");
	addParamsLine("  [--discrAngStep <ang=10>]            : Angular sampling step for computing the reference projections for global matching");
	addParamsLine("  [--gaussian_Fourier <s=0.5>]         : Sigma of Gaussian weigthing in Fourier space (parameter of central-slice method)");
	addParamsLine("  [--gaussian_Real    <s=0.5>]         : Sigma of Gaussian weigthing in real space for spline interpolation in Fourier space (parameter of central-slice method)");
	addParamsLine("  [--zerofreq_weight  <s=0.>]          : Zero-frequency weight (parameter of central-slice method)");
	addExampleLine("xmipp_nma_alignment -i images.sel --pdb 2tbv.pdb --modes modelist.xmd --trustradius_scale 1.2 --sampling_rate 3.2 -o output.xmd --resume");
}
Example #3
0
    void defineParams()
    {
        produces_an_output = true;
        get_image_info = false;

        XmippMetadataProgram::defineParams();
        addUsageLine("Operate with image files headers. By default in Xmipp, geometrical transformations");
        addUsageLine("coming in images files headers are ignored. Instead this information is read from");
        addUsageLine("the images metadata if exist. With this program geometrical transformations can be");
        addUsageLine("extracted to a metadata or assigned to header, also allows print or reset image file headers.");
        addParamsLine("[   --print <decompose=0>]    : Print the geometrical transformations in image file headers.");
        addParamsLine("                              : if input is stack and decompose=1 print header of each individual image.");
        addParamsLine("       alias -p;");
        addParamsLine("or --extract     : The output is a selfile with geometrical transformations read from image file headers.");
        addParamsLine("       alias -e;");
        addParamsLine("      requires -o;");
        addParamsLine("or --assign     : Write the geometrical transformations from selfile to the image file headers.");
        addParamsLine("       alias -a;");
        addParamsLine("or --reset      : Reset the geometrical transformations in image file headers.");
        addParamsLine("       alias -r;");
        addParamsLine("or --tree      : Print the tree scheme from file containers as hdf5 files.");
        addParamsLine("       alias -t;");
        addParamsLine("or --sampling_rate <Ts=-1>  : Change the sampling rate (in Angstrom units) in the image file header.");
        addParamsLine("          : If no value is passed then current value in header is print.");
        addParamsLine("       alias -s;");
        addParamsLine("   [--round_shifts]    :Round shifts to integers");
        addExampleLine("Print the header of the images in metadata: ", false);
        addExampleLine("xmipp_image_header -i images.sel");
        addExampleLine("Extract geometrical transformations from image file headers: ", false);
        addExampleLine("xmipp_image_header -i smallStack.stk --extract -o header.doc");
        addExampleLine("Assign the geometrical transformations from the metadata to header: ", false);
        addExampleLine("xmipp_image_header -i header.doc --assign");
        addSeeAlsoLine("transform_geometry");
        addKeywords("header, geometric, transformation, print");
    }
Example #4
0
//Define Program parameters
void ProgValidationTiltPairs::defineParams()
{
    //Usage
    addUsageLine("Takes two coordinates sets and defines the coordinate transformation between them");
	addUsageLine("First set defines the untilted coordinates, second set defines the tilted coordinates");
	addParamsLine(" --tilt <metadata> : Metadata with angular assignment for the tilted images");
	addParamsLine(" --untilt <metadata> : Metadata with angular assignment for the untilted images");
	addParamsLine(" -o <metadata> : Metadata with matrix transformation");
}
Example #5
0
void ProgCTFPhaseFlipping::defineParams()
{
    addUsageLine("Correct the phase of micrographs");
    addUsageLine("+This program flips the phase of those frequencies that were already ");
    addUsageLine("+flipped by the CTF. Flipping the phase at the level of the micrograph is recommended.");
    addParamsLine(" -i <file>               : Input micrograph");
    addParamsLine(" -o <file>               : Output micrograph");
    addParamsLine(" --ctf <ctfparam_file>   : CTF description");
    addParamsLine(" [--downsampling <D=1>]  : Downsampling factor of the input micrograph with respect to the original");
    addParamsLine("                         : micrograph.");
}
Example #6
0
 void defineParams()
 {
 	addParamsLine("-i <description_file> : Input file with the mathematical features");
 	addParamsLine("-o <output_file>      : Output volume in voxels");
     addUsageLine("Create phantom volume from a feature description file with two Metadatas.");
     addUsageLine("+You may define a mathematical phantom from its geometrical features");
     addUsageLine("+(cubes, cylinders, ...) and translate it into a voxel volume with this program.");
     addUsageLine("+ File format can be found in this [[http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/FileFormats][link]].");
     addExampleLine("xmipp_phantom_create -i phantom.descr -o phantom.vol");
     addExampleLine("++In the following link you can find an example of phantom description file:",false);
     addExampleLine("++",false);
     addExampleLine("++http://newxmipp.svn.sourceforge.net/viewvc/newxmipp/trunk/testXmipp/input/phantom_descr.descr",false);
 }
/* Usage ------------------------------------------------------------------- */
void ProgAngularProjectLibrary::defineParams()
{
    addUsageLine("Create a gallery of projections from a volume");
    addUsageLine("+see [[http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/Angular_project_library_v3][here]] for further information about this program.");

    addParamsLine("   -i <input_volume_file>       : Input Volume");
    addParamsLine("   -o <output_file_name>        : stack with output files");
    addParamsLine("  [--sym <symmetry=c1>]         : Symmetry to define sampling ");
    addParamsLine("                                : One of the 17 possible symmetries in");
    addParamsLine("                                : single particle electron microscopy");
    addParamsLine("  [--sampling_rate <Ts=5>]      : Distance in degrees between sampling points");
    addParamsLine("==+Extra parameters==");
    addParamsLine("  [--sym_neigh <symmetry>]      : symmetry used to define neighbors, by default");
    addParamsLine("                                : same as sym");
    addParamsLine("  [--psi_sampling <psi=360>]    : sampling in psi, 360 -> no sampling in psi");
    addParamsLine("  [--max_tilt_angle <tmax=180>] : maximum tilt angle in degrees");
    addParamsLine("  [--min_tilt_angle <tmin=0>]   : minimum tilt angle in degrees");
    addParamsLine("  [--experimental_images <docfile=\"\">] : doc file with experimental data");
    addParamsLine("  [--angular_distance <ang=20>]     : Do not search a distance larger than...");
    addParamsLine("  requires --experimental_images;");
    addParamsLine("  [--closer_sampling_points]    : create doc file with closest sampling points");
    addParamsLine("  requires --experimental_images;");
    addParamsLine("  [--near_exp_data]             : remove points far away from experimental data");
    addParamsLine("  requires --experimental_images;");
    addParamsLine("  [--compute_neighbors]         : create doc file with sampling point neighbors");
    addParamsLine("  requires --angular_distance;");
    addParamsLine("  [--method <method=fourier>]              : Projection method");
    addParamsLine("        where <method>");
    addParamsLine("                real_space                    : Makes projections by ray tracing in real space");
    addParamsLine("                fourier <pad=1> <maxfreq=0.25> <interp=bspline> : Takes a central slice in Fourier space");
    addParamsLine("                                              : pad controls the padding factor, by default, the padded volume is");
    addParamsLine("                                              : the same than the original volume. ");
    addParamsLine("                                              : maxfreq is the maximum frequency for the pixels and by default ");
    addParamsLine("                                              : pixels with frequency more than 0.25 are not considered.");
    addParamsLine("                                              : interp is the method for interpolation and the values can be: ");
    addParamsLine("                                              : nearest:          Nearest Neighborhood  ");
    addParamsLine("                                              : linear:           Linear  ");
    addParamsLine("                                              : bspline:          Cubic BSpline  ");
    addParamsLine("  [--perturb <sigma=0.0>]       : gaussian noise projection unit vectors ");
    addParamsLine("                                : a value=sin(sampling_rate)/4  ");
    addParamsLine("                                : may be a good starting point ");
    addParamsLine("  [--groups <selfile=\"\">]     : selfile with groups");
    addParamsLine("  [--only_winner]               : if set each experimental");
    addParamsLine("                                : point will have a unique neighbor");

    addExampleLine("Sample at 2 degrees and use c6 symmetry:", false);
    addExampleLine("xmipp_angular_project_library -i in.vol -o out.stk --sym c6 --sampling_rate 2");

}
    void defineParams()
    {

        addUsageLine("Align two volumes varying orientation, position and scale");
        addParamsLine("   --i1 <volume1>        : the first volume to align");
        addParamsLine("   --i2 <volume2>        : the second one");
        addParamsLine("  [--rot   <rot0=0>  <rotF=0>  <step_rot=1>]  : in degrees");
        addParamsLine("  [--tilt  <tilt0=0> <tiltF=0> <step_tilt=1>] : in degrees");
        addParamsLine("  [--psi   <psi0=0>  <psiF=0>  <step_psi=1>]  : in degrees");
        addParamsLine("  [--scale <sc0=1>   <scF=1>   <step_sc=1>]   : size scale margin");
        addParamsLine("  [--grey_scale <sc0=1> <scF=1> <step_sc=1>]  : grey scale margin");
        addParamsLine("    requires --least_squares;");
        addParamsLine("  [--grey_shift <sh0=0> <shF=0> <step_sh=1>]  : grey shift margin");
        addParamsLine("    requires --least_squares;");
        addParamsLine("  [-z <z0=0> <zF=0> <step_z=1>] : Z position in pixels");
        addParamsLine("  [-y <y0=0> <yF=0> <step_y=1>] : Y position in pixels");
        addParamsLine("  [-x <x0=0> <xF=0> <step_x=1>] : X position in pixels");
        addParamsLine("  [--show_fit]      : Show fitness values");
        addParamsLine("  [--apply <file=\"\">] : Apply best movement to --i2 and store results in this file");
        addParamsLine("  [--covariance]    : Covariance fitness criterion");
        addParamsLine("  [--least_squares] : LS fitness criterion");
        addParamsLine("  [--local]         : Use local optimizer instead of exhaustive search");
        addParamsLine("  [--frm <maxFreq=0.25> <maxShift=10>] : Use Fast Rotational Matching");
        addParamsLine("                    : Maximum frequency is in digital frequencies (<0.5)");
        addParamsLine("                    : Maximum shift is in pixels");
        addParamsLine("                    :+ See Y. Chen, et al. Fast and accurate reference-free alignment of subtomograms. JSB, 182: 235-245 (2013)");
        addParamsLine("  [--onlyShift]     : Only shift");
        addParamsLine(" == Mask Options == ");
        mask.defineParams(this,INT_MASK,NULL,NULL,true);
        addExampleLine("Typically you first look for a rough approximation of the alignment using exhaustive search. For instance, for a global rotational alignment use",false);
        addExampleLine("xmipp_volume_align --i1 volume1.vol --i2 volume2.vol --rot 0 360 15 --tilt 0 180 15 --psi 0 360 15");
        addExampleLine("Then, assume the best alignment is obtained for rot=45, tilt=60, psi=90",false);
        addExampleLine("Now you perform a local search to refine the estimation and apply",false);
        addExampleLine("xmipp_volume_align --i1 volume1.vol --i2 volume2.vol --rot 45 --tilt 60 --psi 90 --local --apply volume2aligned.vol");
    }
Example #9
0
seqan::ArgumentParser::ParseResult
parseCommandLine(MasonSplicingOptions & options, int argc, char const ** argv)
{
    // Setup ArgumentParser.
    seqan::ArgumentParser parser("mason_splicing");
    // Set short description, version, and date.
    setShortDescription(parser, "Generating Transcripts");
    setDateAndVersion(parser);
    setCategory(parser, "Simulators");

    // Define usage line and long description.
    addUsageLine(parser,
                 "[OPTIONS] \\fB-ir\\fP \\fIIN.fa\\fP \\fB-ig\\fP \\fIIN.gff\\fP [\\fB-iv\\fP \\fIIN.vcf\\fP] \\fB-o\\fP \\fIOUT.fa\\fP");
    addDescription(parser,
                   "Create transcripts from \\fIIN.fa\\fP using the annotations from \\fIIN.gff\\fP.  The resulting "
                   "transcripts are written to \\fIOUT.fa\\fP.");
    addDescription(parser,
                   "You can pass an optional VCF file \\fIIN.vcf\\fP and the transcripts will be created from the "
                   "haplotypes stored in the VCF file.");

    // Add option and text sections.
    options.addOptions(parser);
    options.addTextSections(parser);

    // Parse command line.
    seqan::ArgumentParser::ParseResult res = seqan::parse(parser, argc, argv);

    // Only extract  options if the program will continue after parseCommandLine()
    if (res != seqan::ArgumentParser::PARSE_OK)
        return res;

    options.getOptionValues(parser);

    return seqan::ArgumentParser::PARSE_OK;
}
seqan::ArgumentParser::ParseResult parseCommandLine(ModifyStringOptions & options, int argc, char const ** argv)
{
	seqan::ArgumentParser parser("fixed_len_trim");
	addOption(parser, seqan::ArgParseOption("i", "input-file", "Path to the input file. Supported input: fq, fq.gz, fastq, fastq.gz, fasta, fasta.gz, fa and fa.gz.", seqan::ArgParseArgument::INPUT_FILE, "IN"));
	setRequired(parser, "input-file");
	setShortDescription(parser, "Methylation Tools");
	setVersion(parser, "0.0.1");
	setDate(parser, "July 2016");
	addUsageLine(parser, "-i [input file] -o [output file] -l [trim length]");
	addOption(parser, seqan::ArgParseOption("l", "length", "Length to trim to.",seqan::ArgParseArgument::INTEGER, "INT"));
	setRequired(parser, "l");
	addOption(parser, seqan::ArgParseOption("o", "output-file", "Path to the output file. You must include a file extension. Supported output types: fq, fastq, fasta and fa.", seqan::ArgParseArgument::OUTPUT_FILE, "OUT"));
	setRequired(parser, "o");

	addDescription(parser, "Trims your fasta files to a fixed length.");
	seqan::ArgumentParser::ParseResult res = seqan::parse(parser, argc, argv);

	// Extract options ONLY if the args are parsed correctly
	if (res != seqan::ArgumentParser::PARSE_OK)
		return res;

	getOptionValue(options.inputFileName, parser, "input-file");
	getOptionValue(options.length, parser, "length");
	getOptionValue(options.outputFileName, parser, "output-file");

	return seqan::ArgumentParser::PARSE_OK;

}
seqan::ArgumentParser::ParseResult parseCommandLine(ModifyStringOptions & options, int argc, char const ** argv)
{
	seqan::ArgumentParser parser("w1/(soon w50)_creator");
	addOption(parser, seqan::ArgParseOption("i", "input-file", "Path to the input file", seqan::ArgParseArgument::INPUT_FILE, "IN"));
	setRequired(parser, "input-file");
	setShortDescription(parser, "Methylation Tools");
	setVersion(parser, "0.0.6");
	setDate(parser, "November 2017");
	addUsageLine(parser, "-i CX_report.txt [\\fIOPTIONS\\fP] ");
	addOption(parser, seqan::ArgParseOption("l", "window-length", "Size of window",seqan::ArgParseArgument::INTEGER, "INT"));
	setDefaultValue(parser, "window-length", "50");

	addDescription(parser, "Create a w1 (and soon w50) file from a CX report.");
	seqan::ArgumentParser::ParseResult res = seqan::parse(parser, argc, argv);

	// If parsing was not successful then exit with code 1 if there were errors.
	// Otherwise, exit with code 0 (e.g. help was printed).
	if (res != seqan::ArgumentParser::PARSE_OK)
		return res;

	getOptionValue(options.inputFileName, parser, "input-file");
	getOptionValue(options.window_length, parser, "window-length");

	return seqan::ArgumentParser::PARSE_OK;

}
Example #12
0
 void defineParams()
 {
 	addUsageLine("Produces a selfile valid for tomography with an MRC stack and a list of angles");
     addParamsLine(" --stack <stack>       : Stack file (not necessarily MRC)");
     addParamsLine(" --tiltAngles <rawtlt> : Tilt angle file");
     addParamsLine(" -o <metadata>         : Output metadata");
 }
Example #13
0
seqan::ArgumentParser::ParseResult
parseCommandLine(MasonMaterializerOptions & options, int argc, char const ** argv)
{
    // Setup ArgumentParser.
    seqan::ArgumentParser parser("mason_materializer");
    // Set short description, version, and date.
    setShortDescription(parser, "VCF Materialization");
    setVersion(parser, "2.0");
    setDate(parser, "July 2012");
    setCategory(parser, "Simulators");

    // Define usage line and long description.
    addUsageLine(parser,
                 "[OPTIONS] \\fB-ir\\fP \\fIIN.fa\\fP \\fB-iv\\fP \\fIIN.vcf\\fP \\fB-o\\fP \\fIOUT.fa\\fP ");
    addDescription(parser,
                   "Apply variants from \\fIIN.vcf\\fP to \\fIIN.fa\\fP and write the results to \\fIout.fa\\fP.");

    // Add option and text sections.
    options.addOptions(parser);
    options.addTextSections(parser);

    // Parse command line.
    seqan::ArgumentParser::ParseResult res = seqan::parse(parser, argc, argv);

    // Only extract  options if the program will continue after parseCommandLine()
    if (res != seqan::ArgumentParser::PARSE_OK)
        return res;

    options.getOptionValues(parser);

    return seqan::ArgumentParser::PARSE_OK;
}
 void defineParams()
 {
     addUsageLine("Shows which is the angular distribution of a set of projections.");
     addUsageLine("+There are three kinds of outputs: a bild file (chimera understands this format), a distance histogram and a postscript file. ");
     addUsageLine("+In postcript, each projection is represented by a small isosceles triangles (the longest part is pointing to Y in the projection plane). ");
     addUsageLine("+In chimera, each projection direction has a sphere whose radius is proportional to the number of images assigned to it");
     addUsageLine("+The histogram output is the histogram of the minimum distance (in degrees) among projections. The distance is measured on the sphere surface. This gives an idea of how compact is the angular distribution.");
     addParamsLine(" -i <metadata>                 : Metadata file with the angles");
     addParamsLine(" -o <file> <type>              : Output file");
     addParamsLine("    where <type>");
     addParamsLine("          chimera <R=60> <rmax=1.5> <shift_center=0>               : R=sphere radius, rmax=maximum point radius, shift_center=shift in pixels applied to all coordinates");
     addParamsLine("                                                                   : shift_center should be half the volume size and R should be 2/3 the volume size");
     addParamsLine("          ps <R=60> <rmax=1.5> <rot=0> <tilt=30> <solid_sphere=0>  : R=sphere radius, rmax=maximum point radius, rot and tilt defines the point of view, solid_sphere=0 (=no) or 1 (=yes)");
     addParamsLine("                                                                : If the sphere is solid, projections in the back plane are not shown");
     addParamsLine("          histogram <stepno=100> : Number of divisions in the histogram");
     addParamsLine("[--up_down_correction]         : correct angles so that a semisphere is shown");
 }
Example #15
0
 // Define parameters
 void defineParams()
 {
     each_image_produces_an_output = true;
     XmippMetadataProgram::defineParams();
     addUsageLine("Finds the 3D center of mass and center the volume around this point");
     mask_prm.defineParams(this,INT_MASK,NULL,"Restrict the center of mass to the mask area.");
     addExampleLine("xmipp_volume_center -i volume.vol -o volumeCentered.vol");
 }
Example #16
0
    void defineParams()
    {
        addUsageLine("Testing paralellization with some sleeping program.");
        addParamsLine("  [--time <sec=5> ]              : Number of seconds to sleep ");
        addParamsLine("  [--rand <min=0> <max=2> ]       : Randon variation (uniform distributed between min and max");
        addParamsLine("  [--tag <string> ]               : Tag to monitor. ");

    }
void ProgValidationNonTilt::defineParams()
{
    addUsageLine("Validate a 3D reconstruction from its projections attending to directionality and spread of the angular assignments from a given significant value");
    addParamsLine("  [--i <md_file=\"\">]         : Metadata file with input projections");
    addParamsLine("  [--volume <md_file=\"\">]    : Volume to validate");
    addParamsLine("  [--odir <outputDir=\".\">]   : Output directory");
    addParamsLine("  [--sym <symfile=c1>]         : Enforce symmetry in projections");
    addParamsLine("  [--significance_noise<float=0.95>] : Significane of the alignment with respect the noise");
    addParamsLine("  [--useSignificant]           : Use Significant as alignment method. If not use projection matching");
}
void ProgValidationNonTilt::defineParams()
{
    //usage
    addUsageLine("Validate a 3D reconstruction from its projections attending to directionality and spread of the angular assignments from a given significant value");
    //params
    addParamsLine("  [--volume <md_file=\"\">]    : Volume to validate");
    addParamsLine("  [--odir <outputDir=\".\">]   : Output directory");
    addParamsLine("  [--sym <symfile=c1>]         : Enforce symmetry in projections");
    addParamsLine("  [--sampling_rate <s=1>]      : Sampling rate in A/px");
}
Example #19
0
 /// Define parameters
 void defineParams()
 {
     addUsageLine("Find the best symmetry of rotation of an image or collection of images");
     addUsageLine("+It is very useful when you want to calculate the rotational symmetry of ");
     addUsageLine("+a set of images (in fact it computes the center of the average image). ");
     addUsageLine("+Image dimensions must be less than 512x512.");
     addSeeAlsoLine("xmipp_image_rotational_spectrum");
     addParamsLine(" -i <file>          : Image, image stack or image selfile");
     addParamsLine(" --oroot <rootname> : Rootname for output files");
     addParamsLine("                    :+ <rootname>_center.xmd contains the image center");
     addParamsLine("                    :+ <rootname>_analyzed_image.xmp (if verbose>=2) contains the image that was actually analyzed");
     addParamsLine("[--r1+ <radius=15>]  : Lowest integration radius (% of the image radius)");
     addParamsLine("[--r2+ <radius=80>]  : Highest integration radius (% of the image radius)");
     addParamsLine("[--r3+ <radius=90>]  : Lowest smoothing radius (% of the image radius)");
     addParamsLine("[--r4+ <radius=100>] : Highest smoothing radius (% of the image radius)");
     addParamsLine("[--x0 <x>]          : Initial center of rotation");
     addParamsLine("[--y0 <y>]          : Initial center of rotation");
     addParamsLine("[--harm+ <n=1>]      : Harmonic to optimize");
     addParamsLine("[--opt+ <opt=-1>]    : Type of optimization (-1=minimize, +1=maximize)");
     addExampleLine("xmipp_image_find_center -i image.xmp");
 }
Example #20
0
// usage ===================================================================
void ProgVolumePCA::defineParams()
{
    addUsageLine("Compute the PCA of a set of volumes, within a mask (optional).");
    addParamsLine("   -i <volumes>             : Metadata with aligned volumes");
    addParamsLine("  [-o <volumes=\"\">]       : Output metadata with PCA projections");
    addParamsLine("  [--Npca <N=1>]            : Number of PCA bases");
    addParamsLine("  [--saveBasis <stack=\"\">]: Save the bases as a stack of volumes");
    addParamsLine("  [--generatePCAVolumes <...>]: List of percentiles (typically, \"10 90\"), to generate volumes along the 1st PCA basis");
    addParamsLine("  [--avgVolume <volume=\"\">] : Volume on which to add the PCA basis");
    addParamsLine("  [--opca <stack=\"\">]     : Stack of generated volumes");
    mask.defineParams(this,INT_MASK);
}
Example #21
0
seqan::ArgumentParser::ParseResult
parseArgs(FxSamCoverageOptions & options,
          int argc,
          char const ** argv)
{
    seqan::ArgumentParser parser("fx_sam_coverage");
    setShortDescription(parser, "Read Coverage Computation.");
    setVersion(parser, "0.1");
    setDate(parser, "August 2012");
    
    addUsageLine(parser, "[\\fIOPTIONS\\fP] \\fB-o\\fP \\fIOUT.tsv\\fP \\fIGENOME.fa\\fP \\fIMAPPING.sam\\fP");
    addDescription(parser, "Compute read coverage and C+G content for a genome.");

    // Two input files: Genome, and mapping.
    addArgument(parser, seqan::ArgParseArgument(seqan::ArgParseArgument::INPUTFILE));
    setValidValues(parser, 0, "fasta fa");
    addArgument(parser, seqan::ArgParseArgument(seqan::ArgParseArgument::INPUTFILE));
    setValidValues(parser, 1, "sam");

    // TODO(holtgrew): I want a custom help text!
    // addOption(parser, seqan::ArgParseOption("h", "help", "This helpful screen."));
    addOption(parser, seqan::ArgParseOption("v", "verbose", "Verbose, log to STDERR."));
    hideOption(parser, "verbose");
    addOption(parser, seqan::ArgParseOption("vv", "very-verbose", "Very verbose, log to STDERR."));
    hideOption(parser, "very-verbose");

    addSection(parser, "Main Options");
    addOption(parser, seqan::ArgParseOption("w", "window-size", "Set the size of the non-overlapping windows in base pairs.", seqan::ArgParseArgument::INTEGER, "NUM"));
    setDefaultValue(parser, "window-size", "10000");

    addSection(parser, "Output Options");
    addOption(parser, seqan::ArgParseOption("o", "out-path", "Path to the resulting file.  If omitted, result is printed to stdout.", seqan::ArgParseArgument::OUTPUTFILE, "TSV"));
    setRequired(parser, "out-path");
    setValidValues(parser, "out-path", "sam.coverage.tsv");

    seqan::ArgumentParser::ParseResult res = parse(parser, argc, argv);

    if (res == seqan::ArgumentParser::PARSE_OK)
    {
        getArgumentValue(options.inGenomePath, parser, 0);
        getArgumentValue(options.inSamPath, parser, 1);
        getOptionValue(options.outPath, parser, "out-path");

        if (isSet(parser, "verbose"))
            options.verbosity = 2;
        if (isSet(parser, "very-verbose"))
            options.verbosity = 3;
    }

    return res;
}
void ProgEvaluateClass::defineParams()
{
    addUsageLine("Evaluate the quality of a set of classes");
    addUsageLine("+The program associates to each class a number of quality measures:");
    addUsageLine("+");
    addUsageLine("+FRC_05 is the digital frequency (<0.5) at which the Fourier Ring Correlation drops below 0.5 ");
    addUsageLine("+(to convert from a digital frequency to one measured in Angstrom invert the digital frequency and multiply by the sampling rate).");
    addUsageLine("+");
    addUsageLine("+DPR_05 is the Differential Phase Residual at the frequency of FRC_05");
    addParamsLine(" -i <infile>             : Metadata with the classification (normally the output of CL2D or ML2D)");
    addParamsLine(" [-o <outfile=\"\">]     : Output file");
    addExampleLine("xmipp_classify_evaluate_classes -i 2D/CL2D/run_001/results_level_00_classes.xmd");
}
// usage ===================================================================
void ProgClassifyCL2DCore::defineParams()
{
    addUsageLine("Compute the core of a CL2D clustering");
    addParamsLine("    --root <rootname>          : Rootname of the CL2D");
    addParamsLine("    --dir <dir>                : Output directory of the CL2D");
    addParamsLine("    --computeCore <thPCAZscore=3> <NPCA=2>: The class cores are computed by thresholding the Zscore of");
    addParamsLine("                               : the class images and their projections onto a nD PCA space (by default, n=2)");
    addParamsLine("or  --computeStableCore <tolerance=1> : The stable core is formed by all the images in the class that have been");
    addParamsLine("                               : in the same class (except in tolerance levels) in the whole hierarchy.");
    addParamsLine("                               : If tolerance=0, then the stable core is formed by the set of images that");
    addParamsLine("                               : have been always together. For this reason, the stable core can be computed only");
    addParamsLine("                               : for the level such that level>tolerance");
    addExampleLine("mpirun -np 4 `which xmipp_mpi_classify_CL2D_core_analysis` -i 2D/CL2D/run_001/results --computeCore");
    addExampleLine("mpirun -np 4 `which xmipp_mpi_classify_CL2D_core_analysis` -i 2D/CL2D/run_001/results --computeStableCore");
}
// Usage -------------------------------------------------------------------
void ProgDetectMissingWedge::defineParams()
{
    addUsageLine("Detect the orientation of the missing wedge in a tomogram. ");
    addUsageLine("+For doing so it fits a couple of planes along which there is a maximum ");
    addUsageLine("+variation between the energy of the Fourier transform on its left and ");
    addUsageLine("+on its right. The missing wedge is coded with four angles (two for each ");
    addUsageLine("+plane). You may also produce a mask with 1 where the missing wedge is, ");
    addUsageLine("+and 0 where the data has been actually measured. Finally, you can also ");
    addUsageLine("+produce a marked magnitude volume (i.e., the magnitude of the Fourier ");
    addUsageLine("+transform where the position of the two planes have been marked). ");
    addParamsLine("  -i <file>           : Input tomogram");
    addParamsLine(" [--maxFreq <f=0.25>] : Maximum frequency to fit the plane (normalized to 0.5)");
    addParamsLine(" [--width <w=2>]      : Width of the probe plane");
    addParamsLine(" [--saveMarks]        : Save the magnitude of the FFT with");
    addParamsLine("                      : marks showing the two planes");
    addParamsLine(" [--saveMask]         : Save a mask for the FFT of this tomogram");
    addParamsLine("                      : 1=Missing wedge, 0=non missing wedge");
    addExampleLine("xmipp_tomo_detect_missing_wedge -i tomogram.vol");
}
Example #25
0
seqan::ArgumentParser buildParser(void)
{
    seqan::ArgumentParser parser;

    setCategory(parser, "5-prime end counter");
    setShortDescription(parser, "Preprocessing Pipeline for Chip-Nexus and Chip-Exo data");
    addUsageLine(parser, " \\fI<READ_FILE1> \\fP \\fI[OPTIONS]\\fP");
    addDescription(parser,
        "");

    addDescription(parser, "");

    seqan::setVersion(parser, SEQAN_APP_VERSION " [" SEQAN_REVISION "]");
    setDate(parser, SEQAN_DATE);

    seqan::ArgParseArgument fileArg(seqan::ArgParseArgument::INPUT_FILE, "positions in bed-format", true);
    setValidValues(fileArg, ".bed");
    addArgument(parser, fileArg);
    setHelpText(parser, 0, "bed file");

    seqan::ArgParseOption readsOpt = seqan::ArgParseOption(
        "i", "input", "Name of the reads file.",
        seqan::ArgParseOption::INPUT_FILE, "INPUT");
    setValidValues(readsOpt, seqan::BamFileIn::getFileExtensions());
    addOption(parser, readsOpt);

    seqan::ArgParseOption outputOpt = seqan::ArgParseOption(
        "o", "output", "Name of output file.",
        seqan::ArgParseOption::INPUT_FILE, "INPUT");
    addOption(parser, outputOpt);

    seqan::ArgParseOption radiusOpt = seqan::ArgParseOption(
        "r", "radius", "radius around peaks to scan ",
        seqan::ArgParseOption::INTEGER, "VALUE");
    setDefaultValue(radiusOpt, 1000);
    setMinValue(radiusOpt, "1");
    addOption(parser, radiusOpt);

    seqan::ArgParseOption filterChromosomesOpt = seqan::ArgParseOption(
        "fc", "filterChromosomes", "Regular expression to remove chromosomes",
        seqan::ArgParseOption::STRING, "REGEX");
    addOption(parser, filterChromosomesOpt);

    return parser;
}
Example #26
0
seqan::ArgumentParser::ParseResult
parseCommandLine(AppOptions & options, int argc, char const ** argv)
{
    // Setup ArgumentParser.
    seqan::ArgumentParser parser("%(NAME)s");
    // Set short description, version, and date.
    setShortDescription(parser, "Put a Short Description Here");
    setVersion(parser, "0.1");
    setDate(parser, "July 2012");

    // Define usage line and long description.
    addUsageLine(parser, "[\\fIOPTIONS\\fP] \"\\fITEXT\\fP\"");
    addDescription(parser, "This is the application skelleton and you should modify this string.");

    // We require one argument.
    addArgument(parser, seqan::ArgParseArgument(seqan::ArgParseArgument::STRING, "TEXT"));

    addOption(parser, seqan::ArgParseOption("q", "quiet", "Set verbosity to a minimum."));
    addOption(parser, seqan::ArgParseOption("v", "verbose", "Enable verbose output."));
    addOption(parser, seqan::ArgParseOption("vv", "very-verbose", "Enable very verbose output."));

    // Add Examples Section.
    addTextSection(parser, "Examples");
    addListItem(parser, "\\fB%(NAME)s\\fP \\fB-v\\fP \\fItext\\fP",
                "Call with \\fITEXT\\fP set to \"text\" with verbose output.");

    // Parse command line.
    seqan::ArgumentParser::ParseResult res = seqan::parse(parser, argc, argv);

    // Only extract  options if the program will continue after parseCommandLine()
    if (res != seqan::ArgumentParser::PARSE_OK)
        return res;

    // Extract option values.
    if (isSet(parser, "quiet"))
        options.verbosity = 0;
    if (isSet(parser, "verbose"))
        options.verbosity = 2;
    if (isSet(parser, "very-verbose"))
        options.verbosity = 3;
    seqan::getArgumentValue(options.text, parser, 0);

    return seqan::ArgumentParser::PARSE_OK;
}
 void defineParams()
 {
     addUsageLine("Separate different disconnected objects in a binary volume. ");
     addUsageLine("+In this way, small objects can be separated from large ones in ");
     addUsageLine("+reconstructions. This is very useful for reconstructions. Objects ");
     addUsageLine("+are written in separate files as binary volumes, too. Output volume ");
     addUsageLine("+number 1 is the background, number 2 corresponds to object 1, number 3 ");
     addUsageLine("+to object 2 ... This program also tells you the number of voxels on ");
     addUsageLine("+each object. ");
     addParamsLine("   -i <fn_in>              : Input image or volume");
     addParamsLine("  [--oroot <fn_root=\"\">] : Root filename for output");
     addParamsLine("                           : By default, the input name");
     addParamsLine("                           : The output masks are <fn_root>_000001.vol, ...");
     addParamsLine("  [--invert]               : Produce inverse masks");
     addParamsLine("  [--min_size <size=0>]    : Save if size is greater than this");
     addSeeAlsoLine("transform_morphology, transform_threshold, transform_mask, volume_segment");
 }
    void defineParams()
    {
        each_image_produces_an_output = true;

        addUsageLine("Adjust the grey level value of the pixels to a specified range.");
        addKeywords("mask, normalization");
        addSeeAlsoLine("transform_normalize");
        XmippMetadataProgram::defineParams();
        addParamsLine("   --range <min_val> <max_val> : Output minimum and maximum values.");
        addParamsLine("   alias -r;");
        addParamsLine("   [--noise <sigma=0>] : Variation of the limit range values.");
        mask_prm.defineParams(this,INT_MASK, NULL, "Pixels in the mask area are guaranteed to be into the specified range.");

        addExampleLine("Adjust an image in the range [-1, 1]:", false);
        addExampleLine("xmipp_transform_range_adjust -i image.xmp -o image_adjust.xmp --range -1 1");
        addExampleLine("Adjust images in a stack applying a circular mask:", false);
        addExampleLine("xmipp_transform_range_adjust -i images.stk -o image_adjust.stk --range -1 1 --mask circular -32");
        addExampleLine("Adjust a selection file in the range [-100, 100] with sigma noise 10:", false);
        addExampleLine("xmipp_transform_range_adjust -i selection.sel --oroot images/im_adjust:spi -o selection_adjust.sel --range -100 100 --noise 10");
    }
seqan::ArgumentParser::ParseResult
parseCommandLine(MasonFragmentSequencingOptions & options, int argc, char const ** argv)
{
    // Setup ArgumentParser.
    seqan::ArgumentParser parser("mason_frag_seqencing");
    // Set short description, version, and date.
    setShortDescription(parser, "Fragment Sequencing Simulation");
    setVersion(parser, "2.1");
    setDate(parser, "March 2013");
    setCategory(parser, "Simulators");

    // Define usage line and long description.
    addUsageLine(parser, "[\\fIOPTIONS\\fP] \\fB-i\\fP \\fIIN.fa\\fP \\fB-o\\fP \\fIOUT.{fa,fq}\\fP "
                 "[\\fB-or\\fP \\fIOUT2.{fa,fq}\\fP]");
    addDescription(parser,
                   "Given a FASTA file with fragments, simulate sequencing thereof.");
    addDescription(parser,
                   "This program is a more lightweight version of mason_sequencing without support for the "
                   "application of VCF and fragment sampling.  Output of SAM is also not available.  However, "
                   "it uses the same code for the simulation of the reads as the more powerful mason_simulator.");
    addDescription(parser,
                   "You can use mason_frag_sequencing if you want to implement you rown fragmentation behaviour, e.g. "
                   "if you have implemented your own bias models.");

    // Add option and text sections.
    options.addOptions(parser);
    options.addTextSections(parser);

    // Parse command line.
    seqan::ArgumentParser::ParseResult res = seqan::parse(parser, argc, argv);

    // Only extract  options if the program will continue after parseCommandLine()
    if (res != seqan::ArgumentParser::PARSE_OK)
        return res;

    options.getOptionValues(parser);

    return seqan::ArgumentParser::PARSE_OK;
}
seqan::ArgumentParser::ParseResult
parseCommandLine(ModifyStringOptions & options, int argc, char const ** argv)
{
    // Setup ArgumentParser.
    seqan::ArgumentParser parser("modify_string");
    // Set short description, version, and date.
    setShortDescription(parser, "String Modifier");
    setVersion(parser, "1.0");
    setDate(parser, "July 2012");

    // Define usage line and long description.
    addUsageLine(parser,
                 "[\\fIOPTIONS\\fP] \"\\fITEXT\\fP\"");
    addDescription(parser,
                   "This program allows simple character modifications to "
                           "each i-th character.");

    // We require one argument.
    addArgument(parser, seqan::ArgParseArgument(
            seqan::ArgParseArgument::STRING, "TEXT"));

    // Define Options -- Section Modification Options
    addSection(parser, "Modification Options");
    addOption(parser, seqan::ArgParseOption(
            "i", "period", "Period to use for the index.",
            seqan::ArgParseArgument::INTEGER, "INT"));
    setDefaultValue(parser, "period", "1");
    addOption(parser, seqan::ArgParseOption(
            "U", "uppercase", "Select to-uppercase as operation."));
    addOption(parser, seqan::ArgParseOption(
            "L", "lowercase", "Select to-lowercase as operation."));

    // Add Examples Section.
    addTextSection(parser, "Examples");
    addListItem(parser,
                "\\fBmodify_string\\fP \\fB-U\\fP \\fIveryverylongword\\fP",
                "Print upper case version of \"veryverylongword\"");
    addListItem(parser,
                "\\fBmodify_string\\fP \\fB-L\\fP \\fB-i\\fP \\fI3\\fP "
                        "\\fIveryverylongword\\fP",
                "Print \"veryverylongword\" with every third character "
                        "converted to upper case.");

    // Parse command line.
    seqan::ArgumentParser::ParseResult res = seqan::parse(parser, argc, argv);

    // Only extract  options if the program will continue after parseCommandLine()
    if (res != seqan::ArgumentParser::PARSE_OK)
        return res;

    // Extract option values.
    getOptionValue(options.period, parser, "period");
    options.toUppercase = isSet(parser, "uppercase");
    options.toLowercase = isSet(parser, "lowercase");
    seqan::getArgumentValue(options.text, parser, 0);

    // If both to-uppercase and to-lowercase were selected then this is an error.
    if (options.toUppercase && options.toLowercase)
    {
        std::cerr << "ERROR: You cannot specify both to-uppercase and to-lowercase!\n";
        return seqan::ArgumentParser::PARSE_ERROR;
    }

    return seqan::ArgumentParser::PARSE_OK;
}