Saravanan666/pypi-org huggingface dataset:
Package: seqpylogger
SeqPyLoggerSeqPyLogger is a python loghandler forseq.Usageimportosos.environ["SEQ_APIKEY"]="xSxExQxAxPxIxKxExYx"os.environ["SEQ_SERVER"]="http://localhost:8794/"os.environ["Environment"]="Staging"importloggingfromseqpyloggerimportSeqPyLoggerroot=logging.getLogger()root.setLevel(logging.INFO)seqLogger=SeqPyLogger(buffer_capacity=10)root.addHandler(seqLogger)logger=logging.getLogger("MyLogger")logger.debug("Debug log message")logger.info("Informational log message")logger.warning("Warning log message")logger.error("Error log message")logger.critical("Critical log message")logger.fatal("Critical log message")logger.info("Test log message with argument%s","dummy argument")logger.info("Test log message with arguments%s,%s","dummy argument 1","dummy argument 2")try:raiseException("Some issue")except:logging.exception("An error occured but now we have the stacktrace")# logging.error("There was an error", exc_info=1)  # alternative to .exception()# logs are flushed every 10 seconds and every 10 logsAn alternative way of setting the handler is using the dictConfigimportosimporttimeimportloggingimportlogging.configos.environ["SEQ_APIKEY"]="xSxExQxAxPxIxKxExYx"os.environ["SEQ_SERVER"]="http://localhost:8794/"os.environ["Environment"]="Staging"logger_config={"version":1,"disable_existing_loggers":True,"root":{"level":logging.INFO,"handlers":["seq"]},"handlers":{"seq":{"level":logging.INFO,"class":"seqpylogger.SeqPyLogger"},},}logging.config.dictConfig(logger_config)logging.info("Example message")InstallationpipinstallseqpyloggerTest installUsed for development on the package.sudopython3-mpipinstall-U.Examplestry:raiseException("Some issue")except:logging.exception("An error occured but now we have the stacktrace")# logging.error("There was an error", exc_info=1)  # alternative to .exception()try:raiseException("Some issue")except:logging.fatal("This time no stacktrace")try:raiseException("Some issue")except:logging.fatal("Stacktrace is not limited to ERROR",exc_info=1)ImagesChangeloginspired byKeep a changelog[2023-02-15][Fixed] Formatting using%dbroke the internal formatter[2023-01-08][Fixed] Update dependencies in Pipfile.lock[Added] Tests for basic usage (added scriptpipenv run tests)[2021-08-20][Fixed] Version file removed as this broke pip installation[Fixed] Missing .version file in MANIFEST.md broke pip installation[2021-08-13][Fixed] Replaced badge.fury.io pypi badge with shields.io[Changed] Added tagging in create_release.sh[Changed] Usedatexitto register flush on exit[Fixed] Fixed issue of duplicate logs when doing a manualflush[2021-03-22][Fixed] Update dependencies in Pipfile.lock[2020-12-29][Fixed] old dependencies for development[2020-07-17][Fixed] .msg and arg objects always converted to str[Changed] internal logs nolonger use root logger[2020-05-13][Fixed] Removed print line when adding seq url without trailing slash[Changed] README example to fully work if copied[Added] changelog to README[Unreleased]Environment variable only works usingEnvironmentwhile full uppercase is the best practice for environment variables
Package: seqqueue
SeqQueuePython queue implementations for incrementally indexed, sequential data. SeqQueue makes sure anyget()call returnes the next(index, item)pair from the queue.Installationpip3installseqqueueInstall from source:gitclonehttps://github.com/highvight/seqqueuecdseqqueue
pip3install.To run tests and benchmarks:pip3install.[testing]Or just copy and paste and one of the classes to your projectUsagefromseqqueueimportSeqQueueq=SeqQueue(start_index=0)q.put((1,"1"))q.put((2,"2"))q.put((0,"0"))print(q.get())# (0, "0")print(q.get())# (1, "1")print(q.get())# (2, "2")Note that Empty and Full exceptions are raised with respect to the indexfromseqqueueimportSeqQueueq=SeqQueue(start_index=0,maxsize=2)q.put((1,"1"))print(q.qsize())# 1q.get(block=False)#  Raises Empty, index=0 not availableq.put((2,"2"),block=False)#  Raises Full, index=2 > maxindexFor multiprocessing, usemultiprocessing.ManagerimportmultiprocessingasmpfromseqqueueimportSeqQueuemanager=mp.Manager()q=manager.SeqQueue(start_index=0)BenchmarkMake sure to install[testing](see Usage). In the project root run:pytestbenchmarkThis will run some benchmarks for concurrentput()andget()calls in comparison toPriorityQueuefrom the standard library. As you can see, depending on the number of threads and maxsize of the queue, keeping incremental index order comes at a cost. For instance, for amaxsize=8andn_threads=[1,2,20], on my Laptop, SeqQeue is ~ 2x-3x slower:put=1, get=1put=2, get=2put=20, get=20PriorityQueue31.8575 (1.0)56.9946 (1.79)76.1026 (2.39)SeqQeue59.4795 (1.87)82.9272 (2.60)197.6096 (6.20)If you find faster implementations please open a MR!In real-world applications the costs of queue management are often negligible. Adjust the benchmark scripts with your real data and thread target functions to find out :)LicenseMIT
Package: seqrecord-expanded
testspackageAnother SeqRecord class with methods: degenerate seqs, codon positions based on
reading frames, etc.UsageBy default it assumes a DNA sequence with ambiguous characters.>>>fromseqrecord_expandedimportSeqRecordExpanded>>>seq_record=SeqRecordExpanded('TCTGAATGGAAGACAAAGCGTCCA',...voucher_code='CP100-09',...taxonomy={'genus':'Melitaea',...'species':'phoebe',...},...gene_code='EF1a',...reading_frame=1,...table=1,# translation table...)>>># Degenerate sequence standard genetic code>>>seq_record.degenerate()'TCNGARTGGAARACNAARMGNCCN'>>>>>># Degenerate sequence S method>>>seq_record.degenerate(method='S')'AGYGARTGGAARACNAARMGNCCN'>>>>>># Degenerate sequence Z method>>>seq_record.degenerate(method='Z')'TCNGARTGGAARACNAARMGNCCN'>>>>>># Degenerate sequence SZ method>>>seq_record.degenerate(method='SZ')'NNNGARTGGAARACNAARMGNCCN'>>>>>># get first codon positions>>>seq_record.first_codon_position()'TGTAAACC'>>>>>># get second codon positions>>>seq_record.second_codon_position()'CAGACAGC'>>>>>># get third codon positions>>>seq_record.third_codon_position()'TAGGAGTA'>>>>>># get first and second positions>>>seq_record.first_and_second_positions()'TCGATGAAACAACGCC'>>>>>># translate to aminoacid sequence>>>seq_record.translate()'SEWKTKRP'>>># translate to aminoacid sequence>>>seq_record.translate(table=1)'SEWKTKRP'Installationpipinstallseqrecord-expandedRequirementspipinstall-rrequirements.txtCompatibilitySupported Python versions: 2.6, 2.7, 3.3, 3.4, 3.5, pypy.LicenceBSD.Authorsseqrecord-expandedwas written byCarlos Peña.
Package: seqrep
SeqRepScientific framework for representation in sequential dataTable of ContentClick to expand!SeqRepTable of ContentDescriptionInstallationFeaturesUsageLicenseAcknowledgementDescriptionThis package aims to simplify the workflow ofevaluation of machine learning models. It is primarily focused on sequential data. It helps with:labeling data,splitting data,feature extraction,feature reduction (i.e. selection or transformation),running pipeline,evaluation of results.It also allows you tovisualizeeach step.The framework is designed for easy customization and extension of its functionality.Installationpython-mpipinstallgit+https://github.com/MIR-MU/seqrepFeaturesSee theREADMEin theseqrep folder.UsageIt is simple to use this package. After the import, you need to do three steps:Create yourpipeline(which you want to evaluate);CreatePipelineEvaluator(according to how you want to evaluate);Run the evaluation.fromsklearn.pipelineimportPipelinefromsklearn.preprocessingimportMinMaxScalerfromsklearn.svmimportSVCfromseqrep.feature_engineeringimportPreviousValuesExtractor,TimeFeaturesExtractorfromseqrep.labelingimportNextColorLabelerfromseqrep.splittingimportTrainTestSplitterfromseqrep.scalingimportUniversalScalerfromseqrep.evaluationimportClassificationEvaluatorfromseqrep.pipeline_evaluationimportPipelineEvaluator# 1. steppipe=Pipeline([('fext_prev',PreviousValuesExtractor()),('fext_time',TimeFeaturesExtractor()),('scale_u',UniversalScaler(scaler=MinMaxScaler())),])# 2. steppipe_eval=PipelineEvaluator(labeler=NextColorLabeler(),splitter=TrainTestSplitter(),pipeline=pipe,model=SVC(),evaluator=ClassificationEvaluator(),)# 3. stepresult=pipe_eval.run(data=data)See theexamples folderfor more details.LicenseThis package is licensed under theMIT license, so it is open source. Feel free to use it!AcknowledgementThanks for the huge support to my supervisorMichal Stefanik! Gratitude also belongs to all members of theMIR-MUgroup. Finally, thanks go to the Faculty of Informatics of Masaryk University for supportingthis projectas a dean's project.
Package: seqreppy
The seqreppy library was designed to provide operations related to numerical representations of genomic sequences, which includes the collection, coding and storage of genomic sequences.The aforementioned operations are called the seqreppy kernel and, therefore, are executed by a special module, written in the C language, called SeqrepC.In addition, Seqreppy provides ready-made routines for the graphical visualization of the coded sequences, as well as some analyzes related to the processing of genomic signals.In addition to installing Seqreppy via PyPI, the interested user needs to compile the SeqrepC core. All instructions regarding the installation of SeqrepC can be found on GitHub (https://github.com/ednilsonlomazi/seqreppy)
Package: seqsearch
seqsearchversion 2.2.1seqsearchis a python package for dealing sequence similarity searches (e.g. BLAST on DNA sequences) and automation.It has many convenience methods that can automatically launch several types of search algorithms, as well as quick installation of sequence reference databases.PrerequisitesSinceseqsearchis written in python, it is compatible with all operating systems: Linux, macOS and Windows. The only prerequisite ispython3(which is often installed by default) along with thepip3package manager.To check if you havepython3installed, type the following on your terminal:$ python3 -VIf you do not havepython3installed, please refer to the sectionobtaining python3.To check you havepip3installed, type the following on your terminal:$ pip3 -VIf you do not havepip3installed, please refer to the sectionobtaining pip3.InstallingTo install theseqsearchpackage, simply type the following commands on your terminal:$ pip3 install --user seqsearchAlternatively, if you want to install it for all users of the system:$ sudo pip3 install seqsearchUsageBellow are some examples to illustrate the various ways there are to use this package.SearchesYou can parallelize BLAST searches by splitting the input into several files. It's easier to chop-up the input, because database chopping requires message passing across the nodes like mpiblast does (when and if it works).Input chopping is fine as long as the database to search against fits in the RAM of the nodes. If the input is small and the database is large you can always switch them one for the other (in most cases).# This example is not completed yet. TODO.Databases# This example is not completed yet. TODO.Extra documentationMore documentation is available at:http://xapple.github.io/seqsearch/seqsearchThis documentation is simply generated with:$ pdoc --output-dir docs seqsearch
Package: seqshannon
SeqShannonSeqShannon is a Python package that calculates the Shannon entropy of biological sequences. It works for both nucleotide and amino acid sequences.DescriptionSeqShannon is a Python package that reads a FASTA file and calculates the Shannon entropy for each biological sequence in the file. It utilizes the BioPython library for parsing FASTA files. The results can be easily written to an output file or printed in the console.The Shannon entropy is a measure of the uncertainty or randomness of a set of data. In the context of biological sequences, such as DNA or protein sequences, the Shannon entropy can provide insights into the variability and complexity of the sequence.InstallationYou can install SeqShannon usingpip:pipinstallseqshannonUsageSeqShannon can be used as a command-line tool or as a Python library.Command-line usageUse a fasta file as input. By default, the package prints out the identifier and calculated Shannon entropy for each sequence in the input file.seqshannon-iexample.fastaYou can also specify a file to save the output.seqshannon-iexample.fasta-ooutput.txtExampleHere are the contents of an example FASTA file:>example_1
VLSISYSRSESSLE
>example_2
TIGQRKPSTFSWSS
>example_3
RAASRSSWERGPRunning SeqShannon on this file will yield the following output:example_12.4137995646056805
example_23.09306920777189
example_32.6258145836939115Python library usageYou can calculate the Shannon entropy of the given sequence by importingshannon_entropy.>>>fromseqshannonimportshannon_entropy>>>fromBio.SeqimportSeq>>>sequence=Seq("ATGCATGC")>>>entropy=shannon_entropy(sequence)>>>print(entropy)2.0ContactFor any issues or suggestions, please contactWojciech Dobrychłop.LicenseSeqShannon is licensed under the MIT License. See theLICENSEfile for more details.
Package: seqSieve
seqSieve===========Installation:pip install seqSieveThis should also install numpy and matplotlib automatically if necessary.If you have trouble installing dependencies via pip, try installingthem with your distribution's package manager.On debian do:apt-get install python-matplotlib python-numpyIt is also possible to run seqSieve without installationpython seqSieve/seqSieve**seqSieve** will try to remove sequences that cause misalignments from a multiple sequence alignment(MSA).It reads a given MSA in multi-fasta format and removes sequences with the highest penalty scores,then builds the next MSA without those sequences. This process is repeated until a user-specifiedcut-off is reached or less than three sequences are left to be aligned.In the default mode "Sites", sequences are penalized for both gaps and insertions by an amount proportional to the percentage of ungapped and gapped sequences, respectively.The modes "Gaps", "uGaps","Insertions", "uInsertions","uInsertionsGaps" always assign a penalty of 1 for the named variation. "u" stands for unique, i.e. uGaps only penalizes unique gaps.With mode "custom" the user sets the penalties for each variation.Usage:####################################### seqSieve######################################usage:seqSieve -f multifasta alignmentoptions:-f, --fasta=FILE    multifasta alignment (eg. "align.fas")OR-F, --fasta_dir=DIR directory with multifasta files (needs -s SUFFIX)-s, --suffix=SUFFIX will try to work with files that end with SUFFIX (eg ".fas")-a, --msa_tool=STR  supported: "mafft", prank, prankf (= prank +F) [default:"mafft"]-i, --max_iterations=NUM    force stop after NUM iterations-n, --num_threads=NUM   max number of threads to be executed in parallel [default: 1]-m, --mode=MODE         set strategy to remove outlier sequences [default: "Sites"]available modes (not case sensitive):"Sites", "Gaps", "uGaps","Insertions","uInsertions","uInsertionsGaps", "custom"-q, --no-realign        don't realign with each iteration (not recommended)-l, --log       write logfile-h, --help      prints thisonly for mode "custom":-g, --gap_penalty=NUM        set gap penalty [default: 1.0]-G, --unique_gap_penalty=NUM set unique gap penalty [default: 10.0]-j, --insertion_penalty=NUM  set insertion penalty [default:1.0]-J, --unique_insertion_penalty=NUM set insertion penalty [default:1.0]-M, --mismatch_penalty=NUM   set mismatch penalty [default:1.0]-r, --match_reward=NUM       set match reward [default: -10.0]Currently supported multiple sequence aligners:- mafft (Katoh, Standley 2013 (Molecular Biology and Evolution 30:772-780)MAFFT multiple sequence alignment software version 7: improvements in performance and usability. http://mafft.cbrc.jp/alignment/software/)- prank (Loytynoja, Goldman  2005 (PNAS 102:10557-10562)An algorithm for progressive multiple alignment of sequences with insertions. http://www.ebi.ac.uk/goldman-srv/prank/prank/Requirements============* matplotlib* numpyExternal Programs-----------------* mafft and/or* prank
Package: seqslab-cli
This package provides a unified command line interface to Atgenomix SeqsLab, a cloud-native biomedical informatics (BioMed IT) platform.Table of ContentsGetting StartedPrerequisitesInstall the SeqsLab CLIInteractive ModeCLI ModeBasic CommandsGetting HelpContributingMore ResourcesGetting StartedPrerequisitesPython 3.8 or laterkeyringdbusglibpkg-configDetail to seeInstallationInstall the SeqsLab CLIpipinstallseqslab-cliInteractive ModeThis mode provides fish-style auto-completion functionality that is user-friendly, especially for beginners.Run interactive mode.seqslabDisplay the available commands.root>helpEnd the current interactive mode session and return to the Linux shell.root>exitCLI ModeThrough the use of subcommands, you can operate the SeqsLab CLI like any traditional Linux-based command-line utility.seqslab-h

seqslabauth-hBasic CommandsAuthentication with the SeqsLab APIRegardless of the mode that you intend to use, you must sign in to authenticate the session. The SeqsLab CLI follows the OAuth 2.0 Device Authorization Grant (external URL) process.Example (interactive mode):Specify the platform backend to be used when launching the SeqsLab CLI. The default value isazure.seqslab--backendazureSign in to the SeqsLab API and obtain API tokens with a single command. By default, the sign-in process uses the Authorization Code Flow.root>authsigninSet the device-code argument toTrue. By default, the sign-in command uses the Device Code Flow for browserless systems.root>authsignindevice-code=TrueObtain an API access token for interacting with SeqsLab API apps.root>authtoken# use token in your request header, ex: Authorization: Bearer {access}Access tokens are persistently cached in the system-supported secret service (for example, Freedesktop Secret Service or macOS Keychain). As a result, valid access tokens can be used across multiple SeqsLab CLI sessions.Help documentationTo view help documentation, use one of the following:root>helpGetting HelpThe best way to interact with our team is through GitHub. You can open an issue and choose from one of our templates for guidance, bug reports, or feature requests.Please check for open similar issues before opening another one.More ResourcesSeqsLab CLI DocumentationContributingThe repository currently does not accept contributions but will eventually be opened to the community.
Package: seqslab-connector
seqslab-connectorThe SeqsLab Connector for Python based onpyhiveallows you to create
a Python DB API connection to Atgenomix SeqsLab interactive jobs (clusters) and develop Python-based workflow applications.
It is a Hive-Thrift-based client with no dependencies on ODBC or JDBC.
It also provides aSQLAlchemydialect and anApache Supersetdatabase engine spec for use with tools to execute DQL.You are welcome to file an issue for general use cases. You can also contact Atgenomix Supporthere.RequirementsPython 3.7 or above is required.InstallationInstall using pip.pip install seqslab-connectorFor Apache Superset integration install withpip install seqslab-connector[superset]UsageDB-APIfromseqslabimporthivecursor=hive.connect(database='run_name',http_path='job_run_id',username='user',password='pass',host='job_cluster_host')cursor.execute('SHOW TABLES')print(cursor.fetchall())cursor.execute('SELECT * FROM my_workflow_table_name LIMIT 10')print(cursor.fetchall())cursor.close()SQLAlchemyfromsqlalchemy.engineimportcreate_engineengine=create_engine('seqslab+hive://user:pass@job_cluster_host/run_name?http_path=job_run_id')Apache SupersetConnecting to DatabasesDocumentationFor the latest documentation, seeSeqsLab.
Package: seqslab-report-parser
This package provides a unified command line interface to Atgenomix SeqsLab, a cloud-native biomedical informatics (BioMed IT) platform.Table of ContentsGetting StartedPrerequisitesInstall the SeqsLab CLIBasic CommandsGetting HelpContributingMore ResourcesGetting StartedPrerequisitesPython 3.8 or laterPyMuPDFpyfaidxpyhgvsInstall the SeqsLab Report Parserpipinstallseqslab-report-parserBasic CommandsParse PDF Report (single)report-parsersingle-i{INPUT_DIR}--ref{FASTA_PATH}--ref_fa{FASTA_IDX_PATH}--ref_gene{REF_GENE_PATH}--trans_cds{TRANSCRIPT_CDS_PATH}--ens_to_nm{ENS_TO_NM_MAPPING_PATH}-m: optional, generate MAF info-v: optional, generate VCF fileParse PDF Report (batch)report-parserbatch-i{INPUT_DIR}-o{OUTPUT_DIR}--ref{FASTA_PATH}--ref_fa{FASTA_IDX_PATH}--ref_gene{REF_GENE_PATH}--trans_cds{TRANSCRIPT_CDS_PATH}--ens_to_nm{ENS_TO_NM_MAPPING_PATH}-m: optional, generate MAF info-v: optional, generate VCF fileGenerate genes.refGenereport-parsergen-ref-gene--output{REF_GENE_PATH}Generate Transcript CDSreport-parsergen-cds--output{TRANSCRIPT_CDS_PATH}--gen_code{GEN_CODE_PATH}--ref{FASTA_PATH}Help documentationTo view help documentation, use one of the following:report-parser-hGetting HelpThe best way to interact with our team is through GitHub. You can open an issue and choose from one of our templates for guidance, bug reports, or feature requests.Please check for open similar issues before opening another one.More ResourcesContributingThe repository currently does not accept contributions but will eventually be opened to the community.
Package: seqspec
seqspecseqspecis a machine-readable YAML file format for genomic library sequence and structure. It was inspired by and builds off of the Teichmann LabSingle Cell Genomics Library StructurebyXi Chen.Genomic library structure depends on both the assay and sequencer (and kit) used to generate and bind the assay-specific construct to the sequencing adapters to generate a sequencing library. Therefore, aseqspecis specific to both a genomics assay and sequencer.A list ofseqspecexamples for multiple assays and sequencers can be found onthis website. Eachspec.yamldescribes the 5'->3' "Final library structure" for the assay and sequencer. Sequence specification files can be formatted with theseqspeccommand line tool.# releasepipinstallseqspec# developmentpipinstallgit+https://github.com/IGVF/seqspec.git# verify installseqspec--helpDocumentation:Learn aboutseqspec:docs/DOCUMENTATION.mdWrite aseqspec:docs/TUTORIAL.mdContribute aseqspec:docs/CONTRIBUTING.mdTheseqspecspecification :docs/SPECIFICATION.mdYouTube video that introducesseqspecbioRxivpreprint that describesseqspec