Saravanan666/pypi-org huggingface dataset:
Package: seqalign
seqalignManage sequence alignmentsInstallationpipinstallseqalignorpipinstall--userseqalignIf you have not already installedpicardtools,
you will also need to run:picardtools-downloadExampleswithSequenceAlignment(<pathtoinputBAMorFASTQfile>)assa:sa.cleans_up_bam=Falsesa.remove_supplementary_alignments()sa.samtools_sort(memory_limit=10)sa.samtools_index()sa.write(<pathtooutputBAMfile>)NotesTheinput_fileargument toSequenceAlignment()should be a string for
single-end reads or for data that is already aligned. For raw paired-end reads,
it should be a tuple containing two strings giving the paths to the two
FASTA / FASTQ files.Command line usageseqalignincludes a couple of pre-built pipelines for aligning ChIP-seq and ATAC-seq data.
They rely on certain environment variables being set, as describedhereTo see the basic command line documentation, simply enterseqalignat the terminal:seqalignThere are two commands for aligning sequencing data:
`seqalign-chip-seq` and `seqalign-atac-seq`. See their
respective documentation by running:

seqalign-chip-seq --help
seqalign-atac-seq --help
Package: seq-aligner
Sequence alignment algorithmGotoh Local AlignmentClassical gotoh local algorithmIn[1]:importseq_alignerIn[2]:r=seq_aligner.gotoh_local_align("CCAGCT","AGCCTA",1,-1,-3,-1)In[3]:seq_aligner.print_align_map(r[0],r[1][0])3AGC5Score:3|||1AGC3Gotoh Semi-Global AlignmentClassical gotoh semi-global algorithm.Initialize the top row and leftmost column to zero and terminate end at either the bottom row or rightmost column [ref].In[4]:r=seq_aligner.gotoh_semi_global_align("CCAGCT","AGCCTA",1,-1,-3,-1)In[5]:seq_aligner.print_align_map(r[0],r[1][0])3AGCT6Score:2|||*1AGCC4Gotoh Local Global AlignmentVariants of the local and semi-global algorithmsIn[6]:r=seq_aligner.gotoh_local_global_align("CCAGCT","AGCCTA",1,-1,-3,-1)In[7]:seq_aligner.print_align_map(r[0],r[1][0])3AGC---5Score:-3|||1AGCCTA6
Package: seq-alignment
seq_alignment : A python tool for sequence alignment and edit distancesModule to determine distances between two strings (or two lists of strings). The primary use case of this package is to allow users to both compute distance measures using different distance algorithms. Additionally, we provide additional functionality to both visualize the alignment of the two strings. This allows users to determine how one string is transformed into another.For reference on differences between global and local alignment, see Chapter 11 and 12 ofAlgorithms on Strings, Trees, and Sequences.InstallationProject is available on pypi, installation via pip:pipinstallseq_alignmentAlgorithms AvailableGlobal Alignment (Wagner Fischer)To run the matching, you importglobal_similarityclass, initialize with the strings you want to compare (accepts strings or list of strings), and then run your algorithm.The main options available are whether to compute back-trace, to not compute backtrace and return on edit distance (or string similarity) values setbacktrace = Falsewhen initalizing the class.## Run algo getting ONLY edit distance#### This runs fast due to not having to store## backtrace valuesfromseq_alignmentimportglobal_similarity# Test valuesstr1=['v','i','n','e']str2=['v','i','n']# Initalize matching class functionsim_init=global_similarity(str1,str2,False)# Run matchingsim_init.run()# Get edit distanceprint("EDIT DISTANCE")print(sim_init.match_distance)Local Alignment (Smith Waterman)Same syntax to running global alignment, but now you import thelocal_similarityclass.## Run algo getting ONLY edit distance#### This runs fast due to not having to store## backtrace valuesfromseq_alignmentimportlocal_similarity# Test valuesstr1=['v','i','n','e']str2=['v','i','n']# Initalize matching class functionsim_init=local_similarity(str1,str2,False)# Run matchingsim_init.run()# Get edit distanceprint("EDIT DISTANCE")print(sim_init.match_distance)
Package: seq-align-two-vars
seq_align_two_varsGeneral infoThis project is created by Jeffrey Cai under supervised by Nathan Ryan, Professor in Mathematics department of Bucknell University.It is used to align sequences with non-uniform varaibales like time or distance. It is based on the idea of Alexandar Murph(https://github.com/cran/sawnuti). We implemented his method in this python package and not only to analysis non-uniform time intervals, but including analysis of more than one varaibles like both time and dis.TechnologiesProject is created with:numpy version: 1.22.4pandas version: 1.5.0matplotlib version: 3.6.0networkx version: 3.0scipy version: 1.10.0sklearn version: 1.2.1Data import:use make_sampleread in datafileinput networks, generate random walk dataSetupTo run this project, install it locally using pip install:$ pip install seq-align-two-varsReference guideSeehttps://caidog1129.github.io/seq_align_two_vars/seq_align_two_vars.html
Package: seqchromloader
seqchromloaderseqchromloader aims to provide versatile and ready-to-use writer/loader for applying deep learning to bioinformatics study.Plan to support dataset formats including:webdataset (done)tfrecord (x)Training framework support:pytorch dataloader (done)pytorch-lightning datamodule (done)NVIDIA-DALI (x)Installationconda (suggested):mamba install -c bioconda -c conda-forge seqchromloaderorconda install -c bioconda -c conda-forge seqchromloaderpippip install seqchromloaderUsageFor detailed usage, please refer todocumentation
Package: seq-conv
SeqConvSeqConvis a PyTorch implementation of a graph convolutional operator that uses long short-term memory (LSTM) to update node embeddings. This is useful for graph datasets where each node represents a sequence, such as a time series.Whereφrandφmare LSTMs (torch.nn.LSTM), andhΘis a neural network. The outputs of each LSTM are the last hidden state,hn, rather than all the output features.InstallationThis module can be installed withpip:$pipinstallseq_convUsageSeqConvis built on PyTorch Geometric and derives from theMessagePassingclass. It expects an input graph where each node's "features" is a sequence of vectors.SeqConv, similarly toNNConv, also incorporates any available edge features when collecting messages from a node's neighbors.Parameters:in_channels(int): Number of channels in the input node sequence (e.g. if each node has a sequence of vectors of size n associated with it, then in_channels = n)out_channels(int): Number of channels in the output node embeddingedge_nn(torch.nn.Module): A neural networkhΘthat maps edge features,edge_attr, of shape[-1, num_edge_features]to shape[-1, out_channels]aggr(string,optional): The message aggregation scheme to use ("add", "mean", "max")root_lstm(bool,optional): If set toFalse, the layer will not add the LSTM-transformed root node features to the outputbias(bool,optional): If set toFalse, the layer will not learn an additive bias**kwargs(optional): Additional arguments fortorch.nn.LSTMExample Usage:importtorchfromseq_convimportSeqConv# Convolutional layerconv_layer=SeqConv(in_channels=1,out_channels=5,edge_nn=torch.nn.Linear(2,5))# Your input graph (see: https://pytorch-geometric.readthedocs.io/en/latest/notes/introduction.html#data-handling-of-graphs)x=torch.randn((3,12,1),dtype=torch.float)# Shape is [num_nodes, seq_len, in_channels]edge_index=torch.tensor([[0,1,1,2],[1,0,2,1]],dtype=torch.long)edge_attr=torch.randn((4,2),dtype=torch.long)# Your output graphx=conv_layer(x,edge_index,edge_attr)# Shape is now [3, 5]To-Do:Allow stacking ofSeqConvlayers.
Package: seqdat
SEQDATSequencingData ManagerUsageSeedocsfor more info. Also view available commands with--help.seqdat--helpStandalone BinaryUsingpyoxidizerand the included config file you can easily generate a
standalone binary to handle python and associated dependencies.Run the below command to generate the binary:pyoxidizerbuild--releaseThis will fetch the necessaryrust/pythoncomponents necessary to compile everything.Then you can find your final binary in./build/x86_64-unknown-linux-gnu/release/install/seqdat/.
Package: seqdiag
seqdiaggenerate sequence-diagram image file from spec-text file.FeaturesGenerate sequence-diagram from dot like text (basic feature).Multilingualization for node-label (utf-8 only).You can get some examples and generated images onblockdiag.com.SetupUse easy_install or pip:$ sudo easy_install seqdiag

Or

$ sudo pip seqdiagCopy and modify ini file. example:$ cp <seqdiag installed path>/blockdiag/examples/simple.diag .
$ vi simple.diagPlease refer tospec-text setting samplesection for the format of thesimpla.diagconfiguration file.spec-text setting sampleFew examples are available.
You can get more examples atblockdiag.com.simple.diagsimple.diag is simply define nodes and transitions by dot-like text format:diagram {
  browser  -> webserver [label = "GET /index.html"];
  browser <-- webserver;
  browser  -> webserver [label = "POST /blog/comment"];
              webserver  -> database [label = "INSERT comment"];
              webserver <-- database;
  browser <-- webserver;
}UsageExecute seqdiag command:$ seqdiag simple.diag
$ ls simple.png
simple.pngRequirementsPython 3.7 or laterblockdiag 1.5.0 or laterfuncparserlib 0.3.6 or laterreportlab (optional)wand and imagemagick (optional)setuptoolsLicenseApache License 2.0
Package: seqdist
SeqdistProbability distributions over sequences in pytorch and cupy.Installpip install seqdistHow to useComparison against builtin pytorch implementation of the standard CTC loss:sample_inputs = logits, targets, input_lengths, target_lengths = ctc.generate_sample_inputs(T_min=450, T_max=500, N=128, C=20, L_min=80, L_max=100)
print('pytorch loss: {:.4f}'.format(ctc.loss_pytorch(*sample_inputs)))
print('seqdist loss: {:.4f}'.format(ctc.loss_cupy(*sample_inputs)))pytorch loss: 12.8080
seqdist loss: 12.8080Speed comparisonPytorch:report(benchmark_fwd_bwd(ctc.loss_pytorch, *sample_inputs))fwd: 4.79ms (4.17-5.33ms)
bwd: 9.69ms (8.33-10.88ms)
tot: 14.47ms (12.67-16.20ms)Seqdist:report(benchmark_fwd_bwd(ctc.loss_cupy, *sample_inputs))fwd: 7.22ms (6.78-7.85ms)
bwd: 6.21ms (5.82-8.57ms)
tot: 13.43ms (12.63-16.41ms)Alignmentsbetas = [0.1, 1.0, 10.]
alignments = {'beta={:.1f}'.format(beta): to_np(ctc.soft_alignments(*sample_inputs, beta=beta)) for beta in betas}
alignments['viterbi'] = to_np(ctc.viterbi_alignments(*sample_inputs))
fig, axs = plt.subplots(2, 2, figsize=(15, 8))
for (ax, (title, data)) in zip(np.array(axs).flatten(), alignments.items()):
    ax.imshow(data[:, 0].T, vmax=0.05);
    ax.set_title(title)
Package: seqeval
seqevalseqeval is a Python framework for sequence labeling evaluation.
seqeval can evaluate the performance of chunking tasks such as named-entity recognition, part-of-speech tagging, semantic role labeling and so on.This is well-tested by using the Perl scriptconlleval,
which can be used for measuring the performance of a system that has processed the CoNLL-2000 shared task data.Support featuresseqeval supports following schemes:IOB1IOB2IOE1IOE2IOBES(only in strict mode)BILOU(only in strict mode)and following metrics:metricsdescriptionaccuracy_score(y_true, y_pred)Compute the accuracy.precision_score(y_true, y_pred)Compute the precision.recall_score(y_true, y_pred)Compute the recall.f1_score(y_true, y_pred)Compute the F1 score, also known as balanced F-score or F-measure.classification_report(y_true, y_pred, digits=2)Build a text report showing the main classification metrics.digitsis number of digits for formatting output floating point values. Default value is2.Usageseqeval supports the two evaluation modes. You can specify the following mode to each metrics:defaultstrictThe default mode is compatible withconlleval. If you want to use the default mode, you don't need to specify it:>>>fromseqeval.metricsimportaccuracy_score>>>fromseqeval.metricsimportclassification_report>>>fromseqeval.metricsimportf1_score>>>y_true=[['O','O','O','B-MISC','I-MISC','I-MISC','O'],['B-PER','I-PER','O']]>>>y_pred=[['O','O','B-MISC','I-MISC','I-MISC','I-MISC','O'],['B-PER','I-PER','O']]>>>f1_score(y_true,y_pred)0.50>>>classification_report(y_true,y_pred)precisionrecallf1-scoresupportMISC0.000.000.001PER1.001.001.001microavg0.500.500.502macroavg0.500.500.502weightedavg0.500.500.502In strict mode, the inputs are evaluated according to the specified schema. The behavior of the strict mode is different from the default one which is designed to simulate conlleval. If you want to use the strict mode, please specifymode='strict'andschemearguments at the same time:>>>fromseqeval.schemeimportIOB2>>>classification_report(y_true,y_pred,mode='strict',scheme=IOB2)precisionrecallf1-scoresupportMISC0.000.000.001PER1.001.001.001microavg0.500.500.502macroavg0.500.500.502weightedavg0.500.500.502A minimum case to explain differences between the default and strict mode:>>>fromseqeval.metricsimportclassification_report>>>fromseqeval.schemeimportIOB2>>>y_true=[['B-NP','I-NP','O']]>>>y_pred=[['I-NP','I-NP','O']]>>>classification_report(y_true,y_pred)precisionrecallf1-scoresupportNP1.001.001.001microavg1.001.001.001macroavg1.001.001.001weightedavg1.001.001.001>>>classification_report(y_true,y_pred,mode='strict',scheme=IOB2)precisionrecallf1-scoresupportNP0.000.000.001microavg0.000.000.001macroavg0.000.000.001weightedavg0.000.000.001InstallationTo install seqeval, simply run:pipinstallseqevalLicenseMITCitation@misc{seqeval,
  title={{seqeval}: A Python framework for sequence labeling evaluation},
  url={https://github.com/chakki-works/seqeval},
  note={Software available from https://github.com/chakki-works/seqeval},
  author={Hiroki Nakayama},
  year={2018},}
Package: seqexplainer
SeqExplainer -- Interpreting sequence-to-function machine learning modelsA huge goal of applying machine learniing to genomics data is toobtain novel geneetic insights [1]. This can be challenging when models are complex (such as with neural networks). There aremany interpretability methodsspecifically designed for such complex sequence-to-function preditctors, but they can be difficult to use and often are not interoperable.The goal of SeqExplainer is to bring all these methods under one roof. We have designed a workflow that can take in any PyTorch model trained to predict labels from DNA sequence and expose it to many of the most popular explainability methods available in the field. We also offer some wrappers for explaining "shallow" sklearn models.What is the scope of SeqExplainer?Most of the core functionality is for post-hoc analysis of a trained model.Common workflowsFeature attribution analysis (coming soon)Identifying motifs in attributions (coming soon)Testing feature dependencies (coming soon)TutorialsExtracting motif syntax rules from a CNN (coming soon)Explaining predictions for shallow models on synthetic MPRAs using SHAP (coming soon)RequirementsThe main dependencies of SeqExplainer are:python
torch
captum
numpy
matplotlib
logomaker
sklearn
shapReferencesNovakovsky, G., Dexter, N., Libbrecht, M. W., Wasserman, W. W. & Mostafavi, S. Obtaining genetics insights from deep learning via explainable artificial intelligence. Nat. Rev. Genet. 1–13 (2022) doi:10.1038/s41576-022-00532-2
Package: seqfile
Generate sequential file names in a thread-safe way.UsageIf you want to create sequential files to write output to (say from
different threads or from consecutive runs of the same program), then
you can use this module from within your program or from the command
line.From the commandline$ seqfile
usage: seqfile [-h] [-m MAX_ATTEMPTS] [-b BASE] prefix [suffix] [folder]
seqfile: error: too few arguments

# Assume files "./a.0.txt" and "./a.3.txt" exist.
$ seqfile a. .txt .
./a.4.txt

# Assume no other files exist.
# This will create files 100 files with names test.*.txt in the current
# folder.
$ seq 100 | xargs -n 1 -P 100 -I{} \
    bash -c "fname=\$(seqfile test. .txt); \
             echo 'Do something awesome with {}' > \$fname"From your program# Assume files "./a.0.txt" and "./a.3.txt" exist.
>> import seqfile

# Providing prefix and suffix finds the next file in the sequence
# ignoring any gaps
>> seqfile.findNextFile('.', prefix='a.', suffix='.txt')
'./a.4.txt'

# Providing a file name generator as fnameGen produces the first file
# which it was successful in creating.
>> seqfile.findNextFile('.', fnameGen=lambda x: 'a.' + str(x) + '.txt')
'./a.1.txt'The returned file will exist, be empty, and can be opened for writing.InstallingThis package is available fromPyPi <https://pypi.python.org/pypi/seqfile>.pip install seqfileYou can install the bleeding edge directly from the source:pip install git+https://github.com/musically-ut/seqfile.git@master#egg=seqfileTestsThe tests can be run usingnosetests(if all dependencies are installed in
the environment) or usingpython setup.py test.CaveatsIt is best not to provide unicode characters in theprefix,suffix, orfolder. Though the support has been tested on all major OSes, it has not
been verfied that all OS/filesystem combinations will work.Also, theO_CREAT | O_EXCELtrick used to create files atomically may not
work on old linux kernels while writing to an NFS.
Package: seqinfer
SeqInferSeqInfer is a Python package for sequence inference, enabling outcome prediction, sequence
generation, and meaningful representation discovery, etc for sequence-like data.Initially focused on biological sequences such as DNA, RNA, and protein sequences, it aims to provide
essential tools and algorithms for handling sequence data. However, the package is designed to be
easily expandable to accommodate other types of sequences, such as SMILE strings or time series.
Relevant helper modules may be added in the future development.**This library was renamed to SeqInfer from SeqLearn to avoid potential conflicts and confusion given that SeqLearn has been used by other people's repo.Table of ContentsInstallationUsageProject StructureExamplesContributingLicenseInstallationYou can installSeqInferusing pip:pip install seqinferOrpip install git+https://github.com/jiajiexiao/seqinfer.gitUsageTo use SeqInfer, simply import the desired modules from theseqsandlearnerssub-packages.For example, you can prepare the data as below:fromseqinfer.seq.datasetsimportSeqFromFileDatasetfromseqinfer.seq.transformsimportCompose,KmerTokenizer,OneHotEncoder,ToTensorfromseqinfer.seq.vocabulariesimportunambiguous_dna_vocabulary_dictseq_dataset=SeqFromFileDataset(seq_file="examples/toys/CCA-TXXAGG-AG-TGG-TC-A-T/pos.fasta",seq_file_fmt="fasta",transform_sequences=Compose([KmerTokenizer(k=1,stride=1,vocab_dict=unambiguous_dna_vocabulary_dict,num_output_tokens=3,special_tokens=None,),OneHotEncoder(vocab_size=len(unambiguous_dna_vocabulary_dict)),ToTensor(),]),)Project StructureThe SeqInfer package is organized into two major parts:seq: Contains modules to define and manage the data/dataset of sequences and provides various
related transformation operations.infer: Contains modules for different learners (learning algorithms) to conduct learning
tasks such as classification, regression, self-supervised representation learning, sequence
generation, etc.ExamplesTheexamplesfolder contains illustrative examples demonstrating the usage of SeqInfer for various
tasks, including classification, regression, multitask learning, etc. Each example includes a README
to guide you through the usage and expected results.ContributingWe welcome contributions to improve and extend SeqInfer. If you would like to contribute, please
follow ourcontribution guidelines(To be added).LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.We hope you find SeqInfer useful for your sequence learning tasks! If you encounter any issues or
have suggestions for improvement, please feel free to open an issue or submit a pull request. Happy
coding!
Package: seqiolib
seqIOLibLibrary to read, write sequence, variants, regions to use them for training of machine learning algorithms.Free software: MIT licenseDocumentation:https://seqiolib.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.1 (2021-02-08)tensorflow 2.2.1numpy <1.19.0 (requirement tensorflow)interval tiling bugfixnot support python 3.8 because pyfaidx has problems with it0.2.0 (2020-08-18)First release on PyPI.
Package: seqits
SeqitsSeqits provides several useful toosl for sequences processing.Installation methodpip install seqitsToolsSeqitspython -m seqits -v # display the version of Seqitspython -m seqits list # display all tools in SeqitsrandseqThis tool can generate cds or protein sequence(s) randamly.ArgumentsDescriptiontypenucl/prot, cds or protein sequence(s)numnumber of sequences(s) to generateout (optional)output file, defaut: output.fashow(optional)whether display the output on the screen or not, defaut: falsee.g.python -m seqits.randseq nucl 100 -o output.fa -s truesearchThis tool can search and extract  sequence(s) you want by  Gene ID or Gene Name.ArgumentsDescriptioninputinput raw fasta filegeneinput gene(s)type (optional)re/string/file, type of input gene(s). re means regulate expression, for file, one gene one line; for string, gene(s) should be seperated with ',', default stringmode (optional)fast/order, "fast" mode may faster than "order" mode, but "order" mode can display your output accoring to the order of input gene(s), default: fastout (optional)output file, defaut: output.fashow (optional)whether display output on the screen or not, defaut: falsee.g.python -m seqits.search input.fa Gene1,Gene2,Gene3 --out output.fapython -m seqits.search input.fa Gene.txt -t fileformatseqThis tool can format the fasta file.ArgumentsDescriptioninputinput raw fasta filenum (optional)number of characters per line, defaut: 60out (optional)output file, defaut: output.fashow (optional)whether display output on the screen or not, defaut: falsee.g.python -m seqits.formatseq input.fa 100retestThis tool can test the regulate expression.ArgumentsDescriptioninputinput filereregulate expressione.g.python -m seqits.retest input.fa ">(Gene\d{1,3})"
Package: seq-json-schema
seq-json-schemaStandardizedJSON Schemafor authoring multi-mission sequences. You can read the schema definitionhere.You can use ourvalidation siteto validate a.seq.jsondocument against the latest schema.JavaScript or TypeScriptInstallnpminstall@nasa-jpl/seq-json-schema--saveBasic UsageimportseqSchemafrom'@nasa-jpl/seq-json-schema/schema.json'assert{type:'json'};console.log(seqSchema);TypeScript TypesThis library also ships with automatically generated TypeScript types from the schema. For example:importtype{Command,SeqJson}from'@nasa-jpl/seq-json-schema/types';constcommand:Command={args:[],stem:'SEND_DATA',time:{type:'COMMAND_COMPLETE'},type:'command',};constseqJson:SeqJson={id:'sequence0',metadata:{},steps:[command],};console.log(seqJson);PythonInstallpipinstallseq-json-schemaBasic Usageimportimportlib.resourcesimportjsonwithimportlib.resources.path('seq-json-schema','schema.json')asschemaPath:file=open(schemaPath)schema=json.load(file)print(schema)Note if you are using a Python version lower than 3.7 you will have to import the schema using theimportlib-resourceslibrary.