Package: irida-staramr-results
IRIDA StarAMR ResultsIRIDA StarAMR Results program enables StarAMR analysis results that were run through IRIDA to be batch downloaded into a collection of spreadsheets using the command line.InstallationPypi Installation:https://pypi.org/project/irida-staramr-results/pip install irida-staramr-resultsConda Installation:https://anaconda.org/bioconda/irida-staramr-resultsconda install -c bioconda irida-staramr-resultsHow to use:Assuming you have already installed the program, you can useirida-staramr-resultscommand.Examples$ irida-staramr-results --help$ irida-staramr-results -u admin -pw password1 -c /path/to/conf.yml -p 1 -o out -fd 2021-01-02 -td 2021-04-31There a few arguments it accepts:ArgumentsRequired:NameShortcutTypeExampleDescription--project-pint1Project(s) to scan for StarAMR results.--config-cstring/path/to/conf.ymlPath to a configuration file.See configuration details here.Optional:NameShortcutTypeExampleDescription--help-hN/AN/AShow help message.--version-vN/AN/AThe current version of irida-staramr-results.--split_results-srN/AN/AExport each analysis results into separate output files resulting to one.xlsxfile per analysis.--username-ustringadminThis is your IRIDA account username.--password-pwstringpassword1This is your IRIDA account password.--output-ostringoutThe name of the output excel file.--from_date-fdstring2021-01-03Download only results of the analysis that were createdfromthis date.*--to_date-tdstring2021-04-01Download only results of the analysis that were createdtothis date.*Notes:* Dates are formatted asYYYY-mm-dd(eg. 2021-04-08) and include hours from 00:00:00 to 23:59:59 of the inputted date.SetupPythonIRIDA StarAMR Results requiresPython version 3.8 or later. Check the Python version you are using with:$ python --versionConfiguration for IRIDA REST APIYou will need to have a client instance in IRIDA.Only IRIDA administrators can create client instances. Users should contact their IRIDA admin for client credentials.Refer toIRIDA client configurationguide for more details.You will need to create your own configuration file in YAML. Here is anexample.Fields:base-url: The server URL to download results from. If you navigate to your instance of IRIDA in your web browser, the URL (after you’ve logged in) will often look like:https://irida.corefacility.ca/irida/. The URL you should enter into the Server URL field is that URL, with api/ at the end. So in the case ofhttps://irida.corefacility.ca/irida/, you should enter the URLhttps://irida.corefacility.ca/irida/api/client-id: The id from the IRIDA client you createdclient-secret: The id from the IRIDA client you createdInstalling from source codeThe following instructions describe how to install and execute IRIDA StarAMR Results from repository.Clone the repository:$ git clone https://github.com/phac-nml/irida-staramr-results.gitInstall and build the project$ cd irida-staramr-results
$ make
$ source .virtualenv/bin/activateExecute the program:Seeargument chartabove for what these arguments means.$ irida-staramr-results -u <IRIDA_USERNAME> -pw <IRIDA_PASSWORD> -c <CONFIG_FILE_PATH> -p <PROJECT> -o <OUTPUT_FILE_NAME> -fd <FROM_DATE> -td <TO_DATE>Running TestsUnit testRunning the unit tests can be done with the command:$ make unittestsDeveloper NotesTo display debug messages, change the logging level fromlogging.INFOtologging.DEBUGincli.py. This will disable the progress bar and display the id of what is being requested.LegalCopyright Government of Canada 2021Written by: National Microbiology Laboratory, Public Health Agency of CanadaLicensed under the Apache License, Version 2.0 (the "License"); you may not use
this work except in compliance with the License. You may obtain a copy of the
License at:http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.ContactGary van Domselaar:gary.vandomselaar@phac-aspc.gc.ca