Saravanan666/pypi-org huggingface dataset:
Package: peakina
Pea Kinaaka 'Giant Panda'Wrapper aroundpandaslibrary, which detects separator, encoding
and type of the file. It allows to get a group of files with a matching pattern (python or glob regex).
It can read both local and remote files (HTTP/HTTPS, FTP/FTPS/SFTP or S3/S3N/S3A).The supported file types arecsv,excel,json,parquetandxml.:information_source: If the desired type is not yet supported, feel free to open an issue or to directly open a PR with the code !Please, read thedocumentationfor more informationInstallationpip install peakinaUsageConsidering a filefile.csva;b
0;0
0;1Just type>>>importpeakinaaspk>>>pk.read_pandas('file.csv')ab000101Or files on a FTPS server:my_data_2015.csvmy_data_2016.csvmy_data_2017.csvmy_data_2018.csvYou can just type>>>pk.read_pandas('ftps://<path>/my_data_\\d{4}\\.csv$',match='regex',dtype={'a':'str'})ab__filename__0'0'0'my_data_2015.csv'1'0'1'my_data_2015.csv'2'1'0'my_data_2016.csv'3'1'1'my_data_2016.csv'4'3'0'my_data_2017.csv'5'3'1'my_data_2017.csv'6'4'0'my_data_2018.csv'7'4'1'my_data_2018.csv'Using cacheYou may want to keep the last result in cache, to avoid downloading and extracting the file if it didn't change:>>>frompeakina.cacheimportCache>>>cache=Cache.get_cache('memory')# in-memory cache>>>df=pk.read_pandas('file.csv',expire=3600,cache=cache)In this example, the resulting dataframe will be fetched from the cache, unlessfile.csvmodification time has changed on disk, or unless the cache is older than 1 hour.For persistent caching, use:cache = Cache.get_cache('hdf', cache_dir='/tmp')Use only downloading featureIf you just want to download a file, without converting it to a pandas dataframe:>>>uri='https://i.imgur.com/V9x88.jpg'>>>f=pk.fetch(uri)>>>f.get_str_mtime()'2012-11-04T17:27:14Z'>>>withf.open()asstream:...print('Image size:',len(stream.read()),'bytes')...Imagesize:60284bytesInstallation on macOS M1 chipsetinstall everythingbrew install hdf5 snappyHDF5_DIR="/opt/homebrew/Cellar/hdf5/1.12.1/" CPPFLAGS="-I/opt/homebrew/Cellar/snappy/1.1.9/include -L/opt/homebrew/Cellar/snappy/1.1.9/lib" poetry installFor more details, here is what is needed:install pytablesbrew install hdf5HDF5_DIR="/opt/homebrew/Cellar/hdf5/1.12.1/" poetry run pip install tablesinstall python-snappybrew install snappyCPPFLAGS="-I/opt/homebrew/Cellar/snappy/1.1.9/include -L/opt/homebrew/Cellar/snappy/1.1.9/lib" poetry run pip install python-snappy
Package: peakoscope
PeakoscopePeakoscope is a python package for hierarchical analysis of peak and valley regions in numeric data.Peak and valley regions can be nested, for example, when a large peak region contains smaller subpeak regions.Based on a one-pass algorithm that finds all peak regions and orders them into a tree.Classes for peak/valley objects and tree objects.Optional interfaces to matplotlib, pandas and polars.Usage examplesCompute the tree of nested peak regions in a data set:>>>importpeakoscope>>>data=[10,30,40,30,10,50,70,70,50,80]>>>print(peakoscope.tree(data))0:10├─5:10│├─9:10│└─6:8└─1:4└─2:3From the tree, select "important" peak regions and print their slice of data:>>>forpeakinpeakoscope.tree(data).filter():...print(data[peak.slice])...[80][70,70][30,40,30]Howto filesThe github repo contains tutorials written as jupyter notebooks:plotting_tutorial.ipynbdataframes_tutorial.ipynbAuthorsEivind Tøstesen,contact@tostesen.noLicenseCopyright (C) 2021-2024 Eivind Tøstesen. This software is licensed underGPLv3CitationCitation can include one or more of:Peakoscope + versionGithub URL:https://github.com/eivindtostesen/hierarchical_peak_findingPyPI URL:https://pypi.org/project/peakoscope/The open-access article:Tøstesen, E.
A stitch in time: Efficient computation of genomic DNA melting bubbles.Algorithms for Molecular Biology, 3, 10 (2008).DOI: 10.1186/1748-7188-3-10
Package: peak-performance
How to use PeakPerformanceFor installation instructions, seeInstallation.md.
For instructions regarding the use of PeakPerformance, check out the example notebook(s) undernotebooks, the complementary example data underexample, and the following introductory explanations.Preparing raw dataThis step is crucial when using PeakPerformance. Raw data has to be supplied as time series meaning for each signal you want to analyze, save a NumPy array consisting of time in the first dimension and intensity in the second dimension (compare example data). Both time and intensity should also be NumPy arrays. If you e.g. have time and intensity of a singal as lists, you can use the following code to convert, format, and save them in the correct manner:import numpy as np
from pathlib import Path

time_series = np.array([np.array(time), np.array(intensity)])
np.save(Path(r"example_path/time_series.npy"), time_series)The naming convention of raw data files is<acquisition name>_<precursor ion m/z or experiment number>_<product ion m/z start>_<product ion m/z end>.npy. There should be no underscores within the named sections such asacquisition name. Essentially, the raw data names include the acquisition and mass trace, thus yielding a recognizable and unique name for each isotopomer/fragment/metabolite/sample.Model selectionWhen it comes to selecting models, PeakPerformance has a function performing an automated selection process by analyzing one acquisiton per mass trace with all implemented models. Subsequently, all models are ranked based on an information criterion (either pareto-smoothed importance sampling leave-one-out cross-validation or widely applicable information criterion). For this process to work as intended, you need to specify acquisitions with representative peaks for each mass trace (see example notebook 1). If e.g. most peaks of an analyte show a skewed shape, then select an acquisition where this is the case. For double peaks, select an acquision where the peaks are as distinct and comparable in height as possible.
Since model selection is a computationally demanding and time consuming process, it is suggested to state the model type as the user (see example notebook 1) if possible.TroubleshootingA batch run broke and I want to restart it.If an error occured in the middle of a batch run, then you can use thepipeline_restartfunction in thepipelinemodule to create a new batch which will analyze only those samples, which have not been analyzed previously.The model parameters don't converge and/or the fit does not describe the raw data well.Check the separate fileHow to adapt PeakPerformance to you data.How to contributeIf you encounter bugs while using PeakPerformance, please bring them to our attention by opening an issue. When doing so, describe the problem in detail and add screenshots/code snippets and whatever other helpful material you can provide.
When contributing code, create a local clone of PeakPerformance, create a new branch, and open a pull request (PR).How to citeWill be updated once the paper has been released and a zenodo DOI has been created.
Package: peakrdl-euvm
PeakRDL-euvmGenerate eUVM register model from compiled SystemRDL input.For the command line tool, see thePeakRDL project.InstallingInstall fromPyPiusing pip:python3 -m pip install peakrdl-euvmExporter UsagePass the elaborated output of theSystemRDL Compilerto the exporter.importsysfromsystemrdlimportRDLCompiler,RDLCompileErrorfrompeakrdl_euvmimporteUVMExporterrdlc=RDLCompiler()try:rdlc.compile_file("path/to/my.rdl")root=rdlc.elaborate()exceptRDLCompileError:sys.exit(1)exporter=eUVMExporter()exporter.export(root,"test.sv")ReferenceeUVMExporter(**kwargs)Constructor for the eUVM Exporter classOptional Parametersuser_template_dirPath to a directory where user-defined template overrides are stored.user_template_contextAdditional context variables to load into the template namespace.eUVMExporter.export(node, path, **kwargs)Perform the export!ParametersnodeTop-level node to export. Can be the top-levelRootNodeor any internalAddrmapNode.pathOutput file.Optional Parametersexport_as_packageIf True (Default), eUVM register model is exported as a SystemVerilog
package. Package name is based on the output file name.If False, register model is exported as an includable header.reuse_class_definitionsIf True (Default), exporter attempts to re-use class definitions
where possible. Class names are based on the lexical scope of the
original SystemRDL definitions.If False, class definitions are not reused. Class names are based on
the instance's hierarchical path.use_uvm_factoryIf True, class definitions and class instances are created using the
UVM factory.If False (Default), UVM factory is disabled. Classes are created
directly via new() constructors.
Package: peakrdl-html
PeakRDL-htmlGenerate address space documentation HTML from compiled SystemRDL input.For the command line tool, see thePeakRDL project.InstallingInstall fromPyPiusing pip:python3 -m pip install peakrdl-htmlExampleAnexample of HTML outputgenerated from a
fictional SystemRDL register description:turboencabulator.rdl.UsagePass the elaborated output of theSystemRDL Compilerinto the exporter.Assumingrootis the elaborated top-level node, or an internalAddrmapNode:frompeakrdl_htmlimportHTMLExporterexporter=HTMLExporter()exporter.export(root,"path/to/output")ReferenceHTMLExporter(**kwargs)Constructor for the HTML exporter classOptional Parametersmarkdown_instOverride the class instance of the Markdown processor.
See theMarkdown modulefor more details.By default, the following extensions are loaded: 'extra', 'admonition', 'mdx_math'user_template_dirPath to a directory where user-defined template overrides are stored.user_static_dirPath to user-defined static content to copy to output directory.user_contextAdditional context variables to load into the template namespace.show_signalsShow signal components. Default is Falseextra_doc_propertiesList of properties to explicitly document.Nodes that have a property explicitly set will show its value in a table
in the node's description. Use this to bring forward user-defined
properties, or other built-in properties in your documentation.generate_source_linksIfTrue, attempts to generate links back to original RDL source deginitions.
Defaults toTrue.gitmetheurl_translatorsOverride the list ofGitMeTheURLtranslators to use when generating source links.
If unset, GitMeTheURL uses its builtin translators, as well as any installed plugins.HTMLExporter.export(node, output_dir, **kwargs)Perform the export!ParametersnodesTop-level node to export. Can be the top-levelRootNodeor any internalAddrmapNode.
Can also be a list ofRootNodeand any internalAddrmapNode.output_dirHTML output directory.Optional ParametersfooterOverride footer text.titleOverride title text.home_urlIf a URL is specified, adds a home button to return to a parent home page.skip_not_presentControl whether nodes withispresent=falseare generated. Default is True.PeakRDL TOML config optionsIf using thePeakRDL command-line tool, some
additional things can be configured via the TOML configuration file.[html]user_template_dir="path/to/dir/"user_static_dir="path/to/dir/"extra_doc_properties=["list","of","properties"]
Package: peakrdl-ipxact
PeakRDL-ipxactThis package implements IP-XACT import and export for the PeakRDL toolchain.Export:Convert compiled SystemRDL input into IP-XACT XMLImport:Read an IP-XACT file and import it into thesystemrdl-compilernamespaceFor the command line tool, see thePeakRDL project.DocumentationSee thePeakRDL-ipxact Documentationfor more details
Package: peakrdl_markdown
PeakRDL-MarkdownThis package implements Markdown exporter for the PeakRDL toolchain.Export:Convert compiled SystemRDL input into Markdown description.For the command line tool, see thePeakRDL
project.UsagePeakRDL project provides a standard CLI interface. It can be installed directly
via pip:$ pip install peakrdl-markdownThen this package can be used with the following command:$ peakrdl markdown input_file.rdl -o output_file.mdDocumentationSee thePeakRDL-Markdown
Documentationfor more details.
Package: peakrdl_python_simple
PeakRDL-PythonThis package implements Python register abstraction layer export for the
PeakRDL toolchain.Export:Convert compiled SystemRDL input into Python register interface.For the command line tool, see thePeakRDL
project.UsageThe basic install comes without the exporter capability, so that the package
can be installed on low-end devices without the need to installsystemrdl-compiler. To have the generator capability install withgeneratorextra:$ pip install peakrdl-python-simple[generator]PeakRDL project provides a standard CLI interface. It can be installed directly
via pip or by installing this package withcliextra:$ pip install peakrdl-python-simple[cli]Then this package can be used with the following command:$ peakrdl python-simple input_file.rdl -o output_interface.pyDocumentationSee thePeakRDL-Python-simple
Documentationfor more details.
Package: peakrdl-uvm
PeakRDL-uvmGenerate UVM register model from compiled SystemRDL input.For the command line tool, see thePeakRDL project.InstallingInstall fromPyPiusing pip:python3 -m pip install peakrdl-uvmExporter UsagePass the elaborated output of theSystemRDL Compilerto the exporter.importsysfromsystemrdlimportRDLCompiler,RDLCompileErrorfrompeakrdl_uvmimportUVMExporterrdlc=RDLCompiler()try:rdlc.compile_file("path/to/my.rdl")root=rdlc.elaborate()exceptRDLCompileError:sys.exit(1)exporter=UVMExporter()exporter.export(root,"test.sv")ReferenceUVMExporter(**kwargs)Constructor for the UVM Exporter classOptional Parametersuser_template_dirPath to a directory where user-defined template overrides are stored.user_template_contextAdditional context variables to load into the template namespace.UVMExporter.export(node, path, **kwargs)Perform the export!ParametersnodeTop-level node to export. Can be the top-levelRootNodeor any internalAddrmapNode.pathOutput file.Optional Parametersexport_as_packageIf True (Default), UVM register model is exported as a SystemVerilog
package. Package name is based on the output file name.If False, register model is exported as an includable header.reuse_class_definitionsIf True (Default), exporter attempts to re-use class definitions
where possible. Class names are based on the lexical scope of the
original SystemRDL definitions.If False, class definitions are not reused. Class names are based on
the instance's hierarchical path.use_uvm_factoryIf True, class definitions and class instances are created using the
UVM factory.If False (Default), UVM factory is disabled. Classes are created
directly via new() constructors.
Package: peakrdl-verilog
PeakRDL-verilogGenerate Verilog register model from compiled SystemRDL inputInstallingInstall from github only at the moment.Exporter UsagePass the elaborated output of theSystemRDL Compilerto the exporter.importsysfromsystemrdlimportRDLCompiler,RDLCompileErrorfrompeakrdl.verilogimportVerilogExporterrdlc=RDLCompiler()try:rdlc.compile_file("path/to/my.rdl")root=rdlc.elaborate()exceptRDLCompileError:sys.exit(1)exporter=VerilogExporter()exporter.export(root,"test.sv")VerificationThe tool will generate a tb for your module in the same directory. This will test the HW interfaceReferenceVerilogExporter(**kwargs)Constructor for the Verilog Exporter classOptional Parametersuser_template_dirPath to a directory where user-defined template overrides are stored.user_template_contextAdditional context variables to load into the template namespace.VerilogExporter.export(node, path, **kwargs)Perform the export!ParametersnodeTop-level node to export. Can be the top-levelRootNodeor any internalAddrmapNode.pathOutput file.Optional Parameters
Package: peaks2utr
peaks2utr: a robust, parallelized Python CLI for annotating 3' UTRpeaks2utr is a Python command-line tool that annotates 3' untranslated regions (UTR) for a given set of aligned sequencing reads in BAM format, and canonical annotation in GFF or GTF format. peaks2utr uses MACS (https://pypi.org/project/MACS2/) to call broad "peaks" of significant read coverage in the BAM file, and uses those peaks that pass a set of criteria as a basis to annotate novel 3' UTRs. This favours BAM files from the likes of 10x Chromium runs, where signal is inherently concentrated at the distal ends of the 3' or 5' UTRs. Reads containing soft-clipped bases and polyA-tails of a given length are detected, and their end bases tallied as "truncation points". When piled up, each co-occurring truncation point is used to determine the precise end base of a given UTR. peaks2utr can be tuned to extend, override or ignore any pre-existing 3' UTR annotations in the input GFF file.InstallationInstall latest release with:pip install peaks2utrAlternatively, to install from source:git clone https://github.com/haessar/peaks2utr.git
cd peaks2utr
python3 -m build
python3 -m pip install dist/*.tar.gzDependenciesInstallation instructions assume a Debian / Ubuntu system with root privileges. Follow the links for instructions for other systems.Requiredbedtoolsapt-get install bedtoolsOptionalGenomeTools(for post-processing of output gff3)apt-get install genometoolsQuick startTo check that peaks2utr has installed correctly, simply run the following in your terminal to initiate a short run with default parameterspeaks2utr-demoThis uses a small demo set of input files contained in the repository:Tb927_01_v5.1.gff&Tb927_01_v5.1.slice.bam. When complete, you should see a fileTb927_01_v5.1.new.gffwhich contains original annotations as well as 3' UTRs with source "peaks2utr".
Package: peak-sdk
Peak SDKWhat is Peak SDK?Peak SDKis a Python-based package which can be used to build AI applications inPeakPlatform. ThePeak SDKprovides an efficient code-based interface to manage platform resources (Web Apps, Workflows and Images). It also includes an interface to use Press API which can help you efficiently create, manage and deploy Press Applications on the Peak.Getting StartedSetting up a Virtual EnvironmentTo ensure a smooth development experience withPeak SDK, we highly recommend creating a Python virtual environment. A virtual environment helps to isolate the dependencies required by your project and prevents conflicts with other projects or the system's global Python environment.Follow these steps to create a virtual environment using Python's built-invenvmodule:Open a terminal.Navigate to your project's root directory (where you plan to work with thePeak SDK).Create a new virtual environment with the following command:python3 -m venv <venv_name>Activate the virtual environment by running:source <venv_name>/bin/activateYou will now be working within the virtual environment, and you can install dependencies and run the project without affecting other projects on your system's Python environment.When you're finished working on your project, you can deactivate the virtual environment using the following command:deactivateInstallationYou can install thePeak SDKwith the following command usingpippipinstallpeak-sdkOr if you want to install a specific versionpip install peak-sdk==<version>ThePeak SDKships with the CLI as well. Once CLI is installed, you can enable auto-completion for your shell by runningpeak --install-completion ${shell-name}command, where shell can be one of[bash|zsh|fish|powershell|pwsh].Once this has run, we need to addcompinitto the shell configuration file (like - .zshrc, .bashrc, etc). To do so, you can the following commandecho "compinit" >> ~/.zshrc # replace .zshrc with your shell's configuration fileUsing the SDK/CLITo start using the SDK and CLI, you'll need either an API Key or an Access Token.If you don't have one yet, sign up for an account on the Peak platform to obtain your API key or Access token.To export it, run the following command in your terminal and replace <api_key> with your actual API key:export API_KEY=<api_key | access_token>DocumentationYou can access the documentation for the SDK and CLI athttps://docs.peak.ai/sdk/.
Here are some quick links to help you navigate easily:SDK ReferenceCLI ReferenceUsageCLI UsageMigration GuideFAQPlatform SupportSupport acrossPython versionson major64-bitplatformsPython VersionLinuxMacOSWindows3.8🟢🟡🟤3.9🟢🟡🟤3.10🟢🟢🟤3.11🟡🟡🟤LegendKeyStatusDescription🟢Supportedregularly tested, and fully supported🟡Limited Supportnot explicitly tested but should work, and supported on a best-effort basis🟤Not Testedshould work, but no guarantees and/or supportMore ResourcesLicenseChangelog
Package: peaksjs-widget
peaksjs-widgetipywidget to interact with audio waveforms through peaks.jsInstallationYou can install usingpip:pipinstallpeaksjs_widgetIf you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
the nbextension:jupyternbextensionenable--py[--sys-prefix|--user|--system]peaksjs_widgetShortcutsyou can interact with the waveform/widgets with following shortcuts:Navigation:Ctrl + wheel: zoomSHIFT + dbl-click: reset zoomSHIFT + wheel: scroll waveformarrow left/right: move playhead left/rightSHIFT + arrow left/right: move playhead left/right a lot.Controls:dbl-click: play from thereSPACE BAR: play/pauseSegments:alt + click: add segmentSHIFT + clickon a segment: remove segmentCtrl + alt + clickon a segment: edit segment's labelPoints:Ctrl + click: add pointSHIFT + clickon a point: remove pointCtrl + alt + clickon a point: edit point's labelyou can also drag points and segments' boundaries with the mouse to edit their positionDevelopment InstallationCreate a dev environment:condacreate-npeaksjs_widget-dev-cconda-forgenodejsyarnpythonjupyterlab
condaactivatepeaksjs_widget-devInstall the python. This will also build the TS package.pipinstall-e".[test, examples]"When developing your extensions, you need to manually enable your extensions with the
notebook / lab frontend. For lab, this is done by the command:jupyter labextension develop --overwrite .
yarn run buildFor classic notebook, you need to run:jupyter nbextension install --sys-prefix --symlink --overwrite --py peaksjs_widget
jupyter nbextension enable --sys-prefix --py peaksjs_widgetNote that the--symlinkflag doesn't work on Windows, so you will here have to run
theinstallcommand every time that you rebuild your extension. For certain installations
you might also need another flag instead of--sys-prefix, but we won't cover the meaning
of those flags here.How to see your changesTypescript:If you use JupyterLab to develop then you can watch the source directory and run JupyterLab at the same time in different
terminals to watch for changes in the extension's source and automatically rebuild the widget.# Watch the source directory in one terminal, automatically rebuilding when neededyarnrunwatch# Run JupyterLab in another terminaljupyterlabAfter a change wait for the build to finish and then refresh your browser and the changes should take effect.Python:If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.Updating the versionTo update the version, install tbump and use it to bump the version.
By default it will also create a tag.pipinstalltbump
tbump<new-version>Publish the packageon npmnpmloginnpmpublishon pypirm-rfdist/
pyproject-build.
twineuploaddist/peaksjs*-uk-tonal
Package: peaksql
Note: This package is in active development and functionality might change or not work correctly (yet)!PeakSQLDynamic machine learning database for genomics. Supports common bed-like dataformats like.bed, and.narrowPeak.bedgraph; and the binarybigwigformat.InstallationPeakSQL can be installed through pip:pip install peaksqlOr installed from source:git clone https://github.com/vanheeringen-lab/peaksql
cd peaksql
pip install .Getting startedimport peaksql

# paths to our files
db_file = 'peakSQL.sqlite'  # where to store our database
assembly = "/path/to/hg38.fa"
data = "binding_sites.bed"

# load data into database
db = peaksql.database.DataBase(db_file)
db.add_assembly(assembly, assembly="hg38", species="human")
db.add_data(data, assembly="data")

# now load as dataset
dataset = peaksql.BedRegionDataSet(db_file, seq_length=101, stride=200)

# use the dataset in your application
for seq, label in dataset:
    ...