-
Notifications
You must be signed in to change notification settings - Fork 1
Metadata_utilities_v31
Adrian Quintana edited this page Dec 11, 2017
·
1 revision
Perform several operations on metadata files. If the -o option is not used the original metadata will be modified. Also you can use the --print option just to print out the result metadata to screen. The combination of -i and -o without other operations can serve to extract data blocks inside a medata and write to an independent one.
See also Metadata_import_v3
Parameters
$: Input metadata file $
: Output metadata file, if not provided result will overwrite input file $--set, -s <set_operation> <md2_file> <label
image> <label2=image2> where <set_operation> can be:
-
- $ or``: Operations on the metadata structure where <operation> can be:
- $ or``: File operations where <file_operation> can be:
- $ or``: Query operations where <query_operation> can be:
- $ or``: Fill a column values(should be of same type) where <fill_mode> can be:
-
$``: Just print medata to stdout, or if -o is specified written to disk. this option is useful for extrating data blocks inside a metadata. $ --mode <mode
overwrite> where <mode> can be:
Concatenate two metadatas. If label is not provided, by default is 'image'
xmipp_metadata_utilities -i mD1.doc --set union mD2.doc -o out.docIntersect two metadatas using label 'order_'
xmipp_metadata_utilities -i mD1.doc --set intersection mD2.doc order_ -o out.docCombine columns from two metadatas. Be sure of both have same number of rows and also there aren't common columns, in that case second metadata columns will be used
xmipp_metadata_utilities -i mD1.doc --set merge mD2.doc -o out.docSort the elements in metadata (using default label 'image').
xmipp_metadata_utilities -i mD1.doc -s sort -o out.docYou can also add columns and 'filling' its values with different options By example, to add the column 'shiftX' with uniform random value between 0 and 10
xmipp_metadata_utilities -i mD1.doc --fill shiftX rand_uniform 0 10 -o out.docOr for initialize metadata columns 'shiftX' and 'shiftY' with a constant value of 5
xmipp_metadata_utilities -i mD1.doc -l "shiftX shiftY" constant 5 -o out.docIf you have columns that represent the filename of a metadata with other data (ex CTFParams) you cant 'expand' the column with the values in that metadta
xmipp_metadata_utilities -i mD1.doc --fill CTFParams expand -o outExpanded.docFor check all options availables for 'filling' mode, use:
xmipp_metadata_utilities --help fillwrite metadata as table in Sqlite3 database. (use xmipp_sqlite3 to visualize results)
xmipp_metadata_utilities -i [email protected] -o [email protected]write metadata as xml file.
xmipp_metadata_utilities -i [email protected] -o [email protected]Copy files in metadata to a location. The metadata will be also copied to new location
xmipp_metadata_utilities -i mD1.doc --file copy /home/pepe/newLocationDelete files in metadata.
xmipp_metadata_utilities -i mD1.doc --file deleteSelect elements in metadata that satisfy a given constrain.
xmipp_metadata_utilities -i mD1.doc --query select "angleRot > 10 AND anglePsi < 0.5" -o out.docYou can also modify your data using SQLite syntax expression
xmipp_metadata_utilities -i a.doc --operate modify_values "angleRot=2.*angleRot" -o b.doc xmipp_metadata_utilities -i a.doc --operate modify_values "angleRot=radians(angleRot)" -o b.doc xmipp_metadata_utilities -i a.doc --operate modify_values "angleRot=sin(radians(angleRot))" -o b.doc xmipp_metadata_utilities -i a.doc --operate modify_values "angleRot=sqrt(angleRot)" -o b.doc xmipp_metadata_utilities -i a.doc --operate modify_values "image=replace(image, 'xmp','spi')" -o b.doc xmipp_metadata_utilities -i a.doc --operate modify_values "image='new_prefix_dir/'||image" -o b.docCount number of images per CTF
xmipp_metadata_utilities -i mD1.doc -q count CTFModel -o out.docimages asigned a ctfgroup
xmipp_metadata_utilities -i mD1.doc -q sum defocusGroup count -o out.docPrint the metadata Size
xmipp_metadata_utilities -i mD1.doc --query sizeRename Column
xmipp_metadata_utilities -i mD1.doc --operate rename_column "weight wRobust"