eu_register.py¶
Given a tab-delimited or JSON input file containing one or more records belonging to one of the profiles
listed on the ENCODE Portal (such as https://www.encodeproject.org/profiles/biosample.json),
either POSTS or PATCHES the records. The default is to POST each record; to PATCH instead, see
the --patch
option.
When POSTING file records, the md5sum of each file will be calculated for you if you haven’t already provided the md5sum property. Then, after the POST operation completes, the actual file will be uploaded to AWS S3. In order for this to work, you must set the submitted_file_name property to the full, local path to your file to upload. Alternatively, you can set submitted_file_name to and existing S3 object, i.e. s3://mybucket/reads.fastq.
Note that there is a special ‘trick’ defined in the encode_utils.connection.Connection()
class that can be taken advantage of to simplify submission under certain profiles.
It concerns the attachment property in any profile that employs it, such as the document
profile. The trick works as follows: instead of constructing the attachment propery object
value as defined in the schema, simply use a single-key object of the following format:
{"path": "/path/to/myfile"}
and the attachment object will be constructed for you.
usage: eu_register.py [-h] [-m DCC_MODE] [-d] [--no-aliases]
[--no-upload-file] -p PROFILE_ID -i INFILE [-w]
[-r REMOVE_PROPERTY] [--patch | --rm-patch]
Named Arguments¶
-m, --dcc-mode |
|
-d, --dry-run |
Default: False |
--no-aliases |
Default: False |
--no-upload-file | |
Don’t upload files when POSTing file objects Default: False | |
-p, --profile_id | |
| |
-i, --infile |
|
-w, --overwrite-array-values | |
Default: False | |
-r, --remove-property | |
| |
--patch |
Default: False |
--rm-patch |
Default: False |