Saravanan666/pypi-org huggingface dataset:
Package: hl7parser
hl7parser - Parse HL7-Messages in Pythonhl7-parseris a parser for HL7 (Health Level 7) messages. It also has limited support for constructing messages.To see what's new in each version, please refer to theCHANGELOG.mdfile in the repository.Installationhl7parseris available through PyPi and can be installed using pip:pip install hl7-parserIt supports Python 2.7 and Python >=3.5 (as of version 0.7).UsageParsing Messages# This is an example message taken from the HL7 Wikipedia article>>>message_text="""... MSH|^~\&|MegaReg|XYZHospC|SuperOE|XYZImgCtr|20060529090131-0500||ADT^A01^ADT_A01|01052901|P|2.5... EVN||200605290901||||200605290900... PID|||56782445^^^UAReg^PI||KLEINSAMPLE^BARRY^Q^JR||19620910|M||2028-9^^HL70005^RA99113^^XYZ|260 GOODWIN CREST DRIVE^^BIRMINGHAM^AL^35209^^M~NICKELL’S PICKLES^10000 W 100TH AVE^BIRMINGHAM^AL^35200^^O|||||||0105I30001^^^99DEF^AN... PV1||I|W^389^1^UABH^^^^3||||12345^MORGAN^REX^J^^^MD^0010^UAMC^L||67890^GRAINGER^LUCY^X^^^MD^0010^UAMC^L|MED|||||A0||13579^POTTER^SHERMAN^T^^^MD^0010^UAMC^L|||||||||||||||||||||||||||200605290900... OBX|1|NM|^Body Height||1.80|m^Meter^ISO+|||||F... OBX|2|NM|^Body Weight||79|kg^Kilogram^ISO+|||||F... AL1|1||^ASPIRIN... DG1|1||786.50^CHEST PAIN, UNSPECIFIED^I9|||A... """.strip()>>>fromhl7parser.hl7importHL7Message>>>msg=HL7Message(message_text)# access segments and their fields by name>>>msg.evn.recorded_datetime.isoformat()'2006-05-29T09:01:00'# .. or index (>>>msg.evn[1].isoformat()'2006-05-29T09:01:00'# repeating fields>>>str(msg.pid.patient_name[0])'KLEINSAMPLE^BARRY^Q^JR'# subfields>>>str(msg.pid.patient_name[0][1])'BARRY'Some common segments are pre-defined andhl7parserwill validate input on the fields:MSH - Message HeaderMSA - Message AcknowledgementEVN - Event TypePID - Patient IdentificationPV1 - Patient Visitand othersSegments which are not defined, will still work, but will lack input validation and you won't be able to access fields by name.If you need support for other segments, file an issue or send a pull request.
Package: hl7tersely
Parser for HL7 messages. Seehttp://www.hl7.orgThe parser delivers a dictionary. The keys are the HL7 terser expressions,
and the value are the values in the message designed by the terser.
Example : Patient Identifier is accessible by a simple access
like hl7dict[“PID-3-1”] if hl7dict is the result of the parsing.Released under MIT Licence.
Package: hl7-transform
Introductionhl7_transformis a Python package that allows for transformation of HL7 messages
using a field mapping dictionary.As a standard, HL7 permits different ways of implementing message interfaces
between systems. For example two systems that exchange ADT or SIU messages often
pass the same information in different fields.
In a hospital, an integration engine would map one type of HL7 messages
to another, transforming the messages on the fly as they are passed through
the interfaces.
This Python package allows you to test message transformation without having
an integration engine in place. You can modify your HL7 message structure freely,
by using a JSON-encoded mapping of fields,
then evaluate the conformance of the newly created transformed messages
to the target software.A live example of this package at work can be found inhl7_transform_webrepository and online.How to useThe easiest way to use this library is to install it from Pypi:pipinstallhl7_transformAlternatively, you can download and build this package from source:gitclonehttps://github.com/pdyban/hl7_transform.git
pythonsetup.pybuild
pythonsetup.pyinstallAfter installation, you can use the Python library in your own projects as well as call standalone script hl7_transform in the shell console of your choice.hl7_transform--helpYou can also build your own projects or experiment in Jupyter notebooks by importing the library in your Python code:fromhl7_transform.mappingimportHL7Mappingfromhl7_transform.transformimportHL7Transformfromhl7_transform.messageimportHL7Messagemapping=HL7Mapping.from_json('test_transform.json')message=HL7Message.from_file('test_msg.hl7')transform=HL7Transform(mapping)transformed_message=transform(message)For example code, see insidetestmodule, in particulartest_transform.py.DocumentationThis project is documented usingsphinx. The documentation pages can be found inReadTheDocs.To understand how the package works, we suggest to start by reading theMapping rulesdocumentation page.
Package: hl7v2GenomicsExtractor
hl7v2GenomicsExtractorIntroductionHL7 Version 2 messaging format is the predominant means by which labs send structured results to Electronic Health Records (EHRs). EHRs can directly import HL7 V2 formatted results that conform to theHL7 Lab Results Interface Implementation Guide. Here, we provide an open source utility for converting variants from VCF/XML format into HL7 V2 format.InstallBefore installing hl7v2GenomicsExtractor you need to install cython and wheel.pip install cython wheelNow, install hl7v2GenomicsExtractor binary from pip.pip install hl7v2GenomicsExtractor>>>importhl7v2GenomicsExtractor>>>hl7v2GenomicsExtractor_converter=hl7v2GenomicsExtractor.Converter(filename="sample.xml",ref_build="GRCh37",patient_id=1234,seed=1,source_class="somatic",variant_analysis_method="sequencing")>>>hl7v2GenomicsExtractor_converter.convert()License and LimitationsSoftware is available for use under anApache 2.0 license, and is intended solely for experimental use, to help further Genomics-EHR integration exploration. Software is expressly not ready to be used with identifiable patient data or in delivering care to patients. Code issues should be tracked here.
Package: hladr4pred2
HLADR4Pred2A computational approach to predict HLA-DRB1-04:01 binders using the sequence information of the peptides.IntroductionHLADR4Pred2 is an update of HLADR4Pred published by our group in 2004. It is developed to predict, scan, and, design the binders of HLA-Class II allele HLA-DRB1-04:01 using sequence information only. In the standalone version, extra-tree classifier based model is implemented alongwith the BLAST search, named it as hybrid approach.
HLADR4Pred2 is also available as web-server athttps://webs.iiitd.edu.in/raghava/hladr4pred2. Please read/cite the content about the HLADR4Pred2 for complete information including algorithm behind the approach.PipThe pip version of hladr4pred2 is written in python3 and following libraries are necessary for the successful run:scikit-learnPandasNumpyblastpMinimum USAGETo know about the available option for the stanadlone, type the following command:hladr4pred2 -hTo run the example, type the following command:hladr4pred2 -i example_input.faThis will predict if the submitted sequences are Binders or Non-binder. It will use other parameters by default. It will save the output in "outfile.csv" in CSV (comma seperated variables).Full Usageusage: hladr4pred2 [-h] 
                       [-i INPUT 
                       [-o OUTPUT]
		       [-j {1,2,3}]
		       [-t THRESHOLD]
                       [-w {9,10,11,12,13,14,15,16,17,18,19,20}]
		       [-d {1,2}]Please provide following arguments for successful run

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        Input: protein or peptide sequence(s) in FASTA format
                        or single sequence per line in single letter code
  -o OUTPUT, --output OUTPUT
                        Output: File for saving results by default outfile.csv
  -j {1,2,3}, --job {1,2,3}
                        Job Type: 1:Predict, 2: Design, 3:Scan, by default 1
  -t THRESHOLD, --threshold THRESHOLD
                        Threshold: Value between 0 to 1 by default 0.16
  -w {9,10,11,12,13,14,15,16,17,18,19,20}, --winleng {9,10,11,12,13,14,15,16,17,18,19,20}
                        Window Length: 9 to 20 (scan mode only), by default 9
  -d {1,2}, --display {1,2}
                        Display: 1:Binders only, 2: All peptides, by default 1Input File:It allow users to provide input in the FASTA format.Output File:Program will save the results in the CSV format, in case user do not provide output file name, it will be stored in "outfile.csv".Threshold:User should provide threshold between 0 and 1, by default its 0.16.Job:User is allowed to choose between three different modules, such as, 1 for prediction, 2 for Designing and 3 for scanning, by default its 1.Window length: User can choose any pattern length between 9 and 20 in long sequences. This option is available for only scanning module.Display type:This option allow users to fetch either only HLA-DRB1-04:01 binding peptides by choosing option 1 or prediction against all peptides by choosing option 2.
Package: hlaquant
HLAQuantAuthor: Austin CrinklawWhat is it?HLAQuant is a pipeline that produces fast and accurate allele specific expression for HLA genes. This is done by quantifying on the peptide binding groove domain using Salmon with personalized sequences.Requirements:Linux OSNCBI Blast+Salmon -- please ensure Salmon is on your PATH!Python 3+Python packages: Pandas, BioPythonHow to use:Installation:HLAQuant can be downloaded through PyPI using the following pip command.pipinstallhlaquantInputHLAQuant takes two input files currently.File one (-hla) consists of a sample_id and then a list of alleles corresponding to that sample's typing (tab separated)File two (-fastq) consists of a sample_id and then a list of FASTQ files corresponding to that sample (paired-end or single-end)
Examples of these inputs can be found under the 'test_data/' directoryUsageA list of parameters and their descriptions can be found with the -h flagpython-mHLAQuant-hOutputThe output will match that of Salmons. It consists of a tab separated file containing the transcript ID (in this case, a specific HLA allele), as well as the number of reads. TPMs can be ignored as they will be inaccurate since we are only quantifying over a few sequences.How does it work?We first take the list of alleles and fetch the corresponding sequences from IMGTNext we extract the sequences corresponding to their groove domains from these sequencesWe build an index for quantification using these G-domain sequencesWe then perform quantification using this indexThe paper outlining this method in detail can be found [....somewhere when it is published]References:This pipeline would be unable to work without SalmonPatro, R., Duggal, G., Love, M. I., Irizarry, R. A., & Kingsford, C. (2017). Salmon provides fast and bias-aware quantification of transcript expression. Nature Methods.
Package: hlatypingtools
HLATypingToolsGetting StartedInstall from PyPI (recommended)To useHLATypingTools, runpip install HLATypingToolsin your terminal.
All python packages necessary forHLATypingToolswill automatically be downloaded.UsageIf you haven't decrypted the data yet (first time you are using the package and you did request access to the product),
run:fromhlatypingtools.decrypt_fileimportdecrypt_filepassword:str="___"# Replace with password provided by the authordecrypt_file(password)It should printFile decrypted successfully.Then you can use the package as follows:fromhlatypingtools.get_infoimportget_allele_infoallele:str="A*01:01"print(get_allele_info(allele,"Broad"))# will output A1print(get_allele_info(allele,"Assigned Type"))# will output A1print(get_allele_info(allele,"G Group"))# will output A*01:01:01Gprint(get_allele_info(allele,"P Group"))# will output A*01:01Pprint(get_allele_info(allele,"% locus"))# will output 11.906Or as follows:fromhlatypingtools.get_infoimportget_locusprint(get_locus("A*01:01"))# will output HLA_AOr as follows to output all possible high-resolution alleles for a given low-resolution typing:fromhlatypingtools.get_infoimportget_same_low_res_broad,get_same_low_res_assigned_typebroad="DQ3"print("DQB1*03:01"inget_same_low_res_broad(broad))# will output Trueprint("DQB1*03:02"inget_same_low_res_broad(broad))# will output Trueassigned_type="DQ7"print("DQB1*03:01"inget_same_low_res_assigned_type(assigned_type))# will output Trueprint("DQB1*03:02"inget_same_low_res_assigned_type(assigned_type))# will output FalseNote:Broad = something like A1, B7, Cw1, DR1,DQ3(!!!), DQA1*01, DR52, DPB1*01, or DPA1*01Assigned Type = something like A1, B7, Cw1, DR1,DQ7(!!!), DQA1*01, DR52, DPB1*01, or DPA1*01Exit codes0: Wrong password.
1: Tried to acess the functions of the package without decrypting the data first.
2: type_info requested is not available.
3: wrong format for a low-resolution input. Has to be of the form A1, B7, Cw1, DR1, DQ3, DQA1*01, DR52, DPB1*01, or 
DPA1*01.About the source codeFollowsPEP8Style Guidelines.All functions are unit-tested withpytest.All variables are correctly type-hinted, reviewed withstatic type checkermypy.All functions are documented withdocstrings.Useful links:Corresponding GitHub repositoryCorresponding PyPI page
Package: hl.colours
hl.coloursadd colours to terminal output.InstallationAutomatic installation:pip install hl.colourshl.coloursis listed inPyPIand
can be installed withpiporeasy_install.Manual installation: Download the latest source fromPyPI.tar xvzf hl.colours-$VERSION.tar.gz
cd hl.colours-$VERSION
sudo python setup.py installThehl.colourssource code ishosted on GitHub.Usage ExampleUsage:import hl.colours as k

for color in ['red', 'yellow', 'bblue', 'byellow']:
    print getattr(k, color)(color)

print k.yellow('This is yellow.')
print k.bred('This is stronger red.')
Package: hlcpy
Hybrid Logical ClockPython implementation of Hybrid Logical Clock.Requires Python version >= 3.7.You can install this package fromPyPI:$pipinstallhlcpyExemplary usageimporthlcpy# BASIC USAGE# Instantiate HLCc=hlcpy.HLC()# specify starting nanos and logical timec=hlcpy.HLC(nanos=123,logical=0)# create from current timec=hlcpy.HLC.from_now()# create from iso8601 timec=hlcpy.HLC.from_str('2020-01-01T00:00:00Z')# string representation of HLCprint(str(c))#>>> 2020-01-01T00:00:00.000000000Z_0# create from string representationc1=hlcpy.HLC.from_str(str(c))# refresh the clockc.sync()# supports comparisonprint(c>c1)#>>> True# merge two eventsc.merge(c1)print(c)#>>> 2021-04-24T18:42:47.001864924Z_0# merge event that occured in the future see the logical tickimporttimefuture=hlcpy.HLC(nanos=int(time.time_ns()+3e9))c.merge(future)print(c)#>>> 2021-04-24T18:42:50.001891328Z_1# More examples - see tests/unit/test_hlc.pyCreditsBased on:https://www.cse.buffalo.edu/tech-reports/2014-04.pdfInspired by:https://www.youtube.com/watch?v=iEFcmfmdh2whttps://github.com/adsharma/hlcpy(based on but heavily rewritten)https://bartoszsypytkowski.com/hybrid-logical-clocks/
Package: hlda
Hierarchical Latent Dirichlet AllocationHierarchical Latent Dirichlet Allocation (hLDA) addresses the problem of learning topic hierarchies from data. The model relies on a non-parametric prior called the nested Chinese restaurant process, which allows for arbitrarily large branching factors and readily accommodates growing
data collections. The hLDA model combines this prior with a likelihood that is based on a hierarchical variant of latent Dirichlet allocation.Hierarchical Topic Models and the Nested Chinese Restaurant ProcessThe Nested Chinese Restaurant Process and Bayesian Nonparametric Inference of Topic HierarchiesImplementationhlda/sampler.pyis the Gibbs sampler for hLDA inference, based on the implementation fromMallethaving a fixed depth on the nCRP tree.InstallationSimply usepip install hldato install the package.An example notebook that infers the hierarchical topics on the BBC Insight corpus can be found innotebooks/bbc_test.ipynb.
Package: hldlib
hldlibA Python package for working with Hyper Light Drifter files.TODO listway better documentationmakedependenciestheir own class; something likeclassDependencies:depends_on:list[int]depends_type:"flag"|"enemy"actor:HLDType|-999999delay:int@classmethoddeffrom_string(cls,string:str):...defto_string(self)->str:...makeroom_settingstheir own class and add level pngs; something likeclassRoomSettings:w:int# widthh:int# heightbg:str|Path# or PIL.Image idk...@classmethoddeffrom_string(cls,string:str):...defto_string(self)->str:...ExamplesHere.
Package: hledger-args
hledger-argsThis package is a replacement forhledger command filewith additional features.Basic UsageSave commands directly in the journal file using the custom directive format below.List available commands with--fileoption without additional name argumentPass multiple command names to output the reportsUse option--pdf-fileto save the reports as pdfInteractive ModeSelect the report from a menu using the flag--interactive.Usingplaceholdersas below, the user can create a report asking multiple additional information on runtime that read the journal files to provide fuzzy search autocompletion, validation and other conveniences.Placeholder Command SubstitutionInInteractive Modeonly, a command can use placeholders by putting them betweencurly bracesand additional prompts wil ask for the value and do the proper substitution.For example,{example_placeholder}will ask for this value and substitute where it is located in the command saved in the journal file.Some placehoder's name offers additional featuresSpecial Placeholders{account}: Fuzzy search existing accounts{payee}: Fuzzy search existing payees{cur}: Fuzzy search existing commodities{tag}: Fuzzy search existing tags and values{tag_name}: Search tag name after "_" and fuzzy search existing values for this tag{months}: Prompt initial and end dates both inclusive.Diferent from default hledger{type}: Select between accounts typeShell CommandsCommands name using{shell_name}doesn't run hledger by default. It can accept any shell command and receive aditional data from TUI programs with dialog, menus, etc.Placeholder[file]subtitute for the path of the first file informed with--fileoption.Can not save to pdf file. Only output to stdout.Sub directive format#+args [command name]:[hledger options]
#+args [other command_name]:[other hledger options]Example:#+args buy_aapl:bal desc:\"Buy AAPL\"
#+args aapl_cur:bal desc:\"Buy AAPL\" cur:{commodity}[NAME]: Command names to run saved in the journal sub directives. Not available in Interactive modeOptions╭─Options────────────────────────────────────────────────────────────────────╮
││
│*--file-fPassthejournalfilepath.Canbemultiplefiles│
│(TEXT)│
│[required]│
││
│--interactive-iRunininteractivemodebyansweringprompts.│
│[NAME]isnotusedinthismode.│
││
│--pdf-file-ooutputthereporttothespecifiedfileinpdf│
│(FILE)│
││
│NAME(TEXT)│
││
│--help-hShowthismessageandexit.│
││
╰──────────────────────────────────────────────────────────────────────────────╯InstallationDependenciespython 3.8hledgerInstallation commandpip install --upgrade hledger-args
Package: hledger-utils
🛠️hledgerUtilitiesThis Python package extendshledgertheplaintextaccountingtool with some utilities.✨ Features Added tohledgerhledger edit ...: 📝 EditinghledgerTransactions in your$EDITOR# Opens your EDITOR (or VISUAL) with only transactions in € that have a Berlin tag# You can modify them as usual, if you save and quit the editor, the changes will be# applied to the appropriate fileshledgereditcur:€tag:location=Berlin# Opens your EDITOR with all transactionshledgeredit# If you don't have LEDGER_FILE set, you need to specify a journal file as usual:hledgeredit-fjournal.hledger# More examples and explanations:hledgeredit--helpThis should work with pretty much any hledger query, just substitutehledger balanceorhledger registeretc. with 'hledger edit'. This is a neat way of quickly editing transactions you were just inspecting.🎥 Check this screencast below to seehledger editin action:hledger plot ...: 📈 Plotting charts of hledger queries# Open an interactive line chart of your assets with forecast (if available) and also save it as PNGhledgerplot--balance^Assets--daily--exchange=USD--historical--forecast-oassets.png# Help, examples and configuration options (renaming, inverting, summing, styling, etc..)hledgerplot--help📈 Example plot:Note: Currently, only thebalancecommand output can be plotted.hledger-plothas many options, check them out withhledger-plot --help, most notably:--summing and--meaning columns by regex--multiplying a column with a factorFiltering columns with--dropand--onlyregexes--resampleing to a different interval, e.g. 10 days with--resample 10dadding--trends to (specific time periods of) columns and show slope in legend at configurable intervalgrouping e.g. by quarter with--groupby quarterto compare quarters--styleing depending on the account nameConsider converting your amounts to one currency (e.g.-X€) and using--historical.--stacked --barplots are also available.Seethedoc/folderfor examples ofhledger-plot.📦 Installation# Install this package from PyPI:pipxinstallhledger-utils# Install the latest development version:pipxinstallgit+https://gitlab.com/nobodyinperson/hledger-utils# Install from the repository rootgitclonehttps://gitlab.com/nobodyinperson/hledger-utilscdhledger-utils
pipxinstall.The previous commands will installhledger-editandhledger-plotto~/.local/bin/by default. Make sure that directory is in yourPATH.This package is also available in the AUR ashledger-utils(latest release) andhledger-utils-git(development version).📝 ChangelogVersion tags (v*) are annotated with a summary of changes. You can view them for exampleon GitLabor from the repository with this command:gittag-l'v*'-n99--sort=-version:refname--format='%(color:green)%(refname:strip=2)%(color:yellow) (%(color:cyan)%(creatordate:format:%a %b %d %Y)%(color:yellow))%0a%(color:magenta)==========================%0a%0a%(color:yellow)%(contents:subject)%(color:normal)%0a%0a%(contents:body)'