semvec/pypi-packages huggingface dataset:
hz-scanvirus 0.5.2
HeZhong AV Pack. Uses version 5.31 of the engine.
Requires Python: >=3.6

# By tjsh
# Web: https://bbs.flexible-world.com/

# How do I install it?:
```
pip install hz_scanvirus
```

***

# Module List:
    [ScanFile.py] - Scan a File.
    [GetMD5.py] - Get a File MD5.
    [ListDirectory.py] - Lists all files in the directory.

***

# How do I use it?

### Here is an example of scanning a file.
```
import hz_scanvirus
r = hz_scanvirus.ScanFile('path')
print(r)
```


### The following results are returned.
- if False/None : Not detected
- if not False/None : This is the virus name
- if Error : try again.Feedback the Error? To https://bbs.flexible-world.com !

### If you want to get the file hash code, or use other features, read the module help.
***
### Currently completed features:
- [x] Scan Module
  - [x] Scan File
  - [x] Get Hash
  - [x] Get File List
- [ ] NetWork
  - [ ] VirusTotal API
  - [ ] Update DataBase
***
- Update URL: [Update File Download](https://bbs.flexible-world.com/down/bd.fne)
- Update Date: [Update Date](https://bbs.flexible-world.com/down/ver.txt)
- Git: [Software Gitee](https://gitee.com/tjsh/hezhong-antivir49 )
- Pack Git: [Pack Gitee](https://gitee.com/tjsh/hz_scanvirus)
- My Gitee: [My Gitee](https://gitee.com/tjsh)
flowalign 0.11
Alignment generator using mappy and Python
Requires Python: >=3.6

# FlowAlign

FlowAlign is a package to simplify realignment to a reference for viral sequences, using only Python packages. (Under the hood it is using minimap2, so it's fast.)

## Installation

```bash
pip install flowalign
```
## Usage (command-line)
```bash
flowalign sequences.fasta --reference wuhCor1.fa --output aligned.fa
```

If you omit the output parameter, output will go to STDOUT.

## Usage (Python):
First we download the reference, and some unaligned sequences to align to it:
```bash
wget https://hgdownload.soe.ucsc.edu/goldenPath/wuhCor1/bigZips/wuhCor1.fa.gz && gunzip wuhCor1.fa.gz
wget https://data.nextstrain.org/files/ncov/open/global/sequences.fasta.xz &&  xz --decompress sequences.fasta.xz
```

Then we write a simple Python script, creating an iterator called `aligned` that will yield reference-aligned versions of these unaligned sequences:
```py
import flowalign
aligned = flowalign.yield_aligned(input="sequences.fasta", reference= "wuhCor1.fa")
for name, aligned_sequence in aligned:
    print(">"+name)
    print(aligned_sequence)
```

yield_aligned can also take a stream, e.g.:
```py
aligned = flowalign.yield_aligned(input=open("sequences.fasta","rt), reference= "wuhCor1.fa")
```

Under the hood, mappy is in some sense calling minimap2 with `--secondary=no --sam-hit-only --score-N=0 -x asm5`.

Note that the multiprocessing implementation is fairly hacky which may cause issues. It is mostly expected that `yield_aligned` will be only called once at any one time.




## Acknowledgements

This package is developed by me, but it owes almost everything to [sam_2_fasta](https://github.com/cov-ert/datafunk/blob/master/datafunk/sam_2_fasta.py) by [Ben Jackson](https://github.com/benjamincjackson) at the University of Edinburgh -- [major functions](https://github.com/theosanderson/flowalign/blob/main/src/flowalign/functions_based_on_sam_2_fasta.py) are taken from that codebase. (Ben has also ported this code to [gofasta](https://github.com/cov-ert/gofasta)). Sam2fasta is typically run on a SAM file from [minimap2](https://github.com/lh3/minimap2). flowalign incorporates the alignment process using [mappy](https://pypi.org/project/mappy/), the Python-bindings for minimap2. The idea is that one doesn't need any dependencies except Python packages (mappy supplies its own minimap2) to get aligned sequences.