Skip to main content

pl-mpcs

https://badge.fury.io/py/mpcs.svg https://travis-ci.org/FNNDSC/mpcs.svg?branch=master https://img.shields.io/badge/python-3.5%2B-blue.svg

Abstract

This app simulates a call to a remote Multi-Party Compute (MPC) in the context of a FreeSurfer workflow.

This particular application simply returns a z-score file to be consumed by a downstream plugin, typciall pl-z2labelmap.

NOTE: The <inputDir> is largely ignored by this plugin.

Synopsis

python mpcs.py                                                  \
    [--random] [--seed <seed>]                                  \
    [-p <f_posRange>] [--posRange <f_posRange>]                 \
    [-n <f_negRange>] [--negRange <f_negRange>]                 \
    [-z <zFile>] [--zFile <zFile>]                              \
    [-v <level>] [--verbosity <level>]                          \
    [--version]                                                 \
    [--man]                                                     \
    [--meta]                                                    \
    <inputDir>
    <outputDir>

Run

This plugin can be run in two modes: natively as a python package or as a containerized docker image.

Using PyPI

To run from PyPI, simply do a

pip install mpcs

and run with

mpcs.py --man /tmp /tmp

to get inline help. The app should also understand being called with only two positional arguments

mpcs.py /some/input/directory /destination/directory

Using docker run

To run using docker, be sure to assign an “input” directory to /incoming and an output directory to /outgoing. Make sure that the $(pwd)/out directory is world writable!

Now, prefix all calls with

docker run --rm -v $(pwd)/out:/outgoing                             \
        fnndsc/pl-mpcs mpcs.py                                      \

Thus, getting inline help is:

mkdir in out && chmod 777 out
docker run --rm -v $(pwd)/in:/incoming -v $(pwd)/out:/outgoing      \
        fnndsc/pl-mpcs mpcs.py                                      \
        --man                                                       \
        /incoming /outgoing

Arguments

[--random] [--seed <seed>]
If specified, generate a z-score file based on <posRange> and
<negRange>. In addition, if a further optional <seed> is passed,
then initialize the random generator with that seed, otherwise
system time is used.

[-p <f_posRange>] [--posRange <f_posRange>]
Positive range for random max deviation generation.

[-n <f_negRange>] [--negRange <f_negRange>]
Negative range for random max deviation generation.

[-z <zFile>] [--zFile <zFile>]
z-score file to save in output directory. Defaults to 'zfile.csv'.

[-v <level>] [--verbosity <level>]
Verbosity level for app. Not used currently.

[--version]
If specified, print version number.

[--man]
If specified, print (this) man page.

[--meta]
If specified, print plugin meta data.

Examples

Create a z-file with values between -3.0 and +3.0

mkdir in out && chmod 777 out
docker run --rm -v $(pwd)/in:/incoming -v $(pwd)/out:/outgoing      \
        fnndsc/pl-mpcs mpcs.py                                      \
        -random --seed 1                                            \
        --posRange 3.0 --negRange -3.0                              \
        in out

Metadata

Release files for mpcs 1.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mpcs 1.0.10
File Size Uploaded Provenance
mpcs-1.0.10.tar.gz 6.0 kB Without provenance Details

Release files / mpcs-1.0.10.tar.gz

Download URL mpcs-1.0.10.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
40adf39e80eac0c24e1513b3784d7236120a9eddd9567071c8b54461c293f3db
BLAKE2b-256 checksum
How to use checksums
910afa6359108a16e946e35a212f957971057419dc51d98c0d52e4508e7a4ef8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Security for mpcs 1.0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page