Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
400 changes: 0 additions & 400 deletions BioFilterToolsPro.py

This file was deleted.

36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,24 @@ if __name__ == "__main__":
```
В результате работы функции `filter_fastq` в директории ./data сохранится файл filtered.fastq с отфильтрованными последовательностями из изначального файла example.fastq.

Вы также можете вызвать `filter_fastq` из командной строки. Пример для таких же параметров:

``` bash
python .\BioFilterToolsPro.py -i {path_to_yours_fastq.fastq} -o {output_path.fastq} -gc 80 -len 500 -q 40
```

*Параметры командной строки:*

* -i/--input: путь к входному FASTQ-файлу

* -o/--output: путь для сохранения отфильтрованного файла

* -gc/--gc_content: границы GC-состава (число или диапазон)

* -len/--length: границы длины (число или диапазон)

* -q/--quality: минимальный порог качества

***Исходный example_fastq.fastq***
```Python
@K00271:89:HHWWNBBXX:2:1101:23277:1068 1:N:0:CAGATC
Expand Down Expand Up @@ -385,6 +403,24 @@ if __name__ == "__main__":
```
As a result of running the filter_fastq function, a file named filtered.fastq containing the filtered sequences from the original file example.fastq will be saved in the ./data directory. If the filtered directory did not previously exist, it will be created in the current directory.

Can also be called from command line:

``` bash
python .\BioFilterToolsPro.py -i input.fastq -o output.fastq -gc 80 -len 500 -q 40
```

*Command line parameters:*

* -i/--input: path to input FASTQ file

* -o/--output: path for filtered output file

* -gc/--gc_content: GC content bounds (number or range)

* -len/--length: length bounds (number or range)

* -q/--quality: minimum quality threshold

***Original example_fastq.fastq***
```Python
```Python
Expand Down
Binary file removed flake8_hw4.png
Binary file not shown.
17 changes: 17 additions & 0 deletions logs.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
INFO | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> Filtering completed. Total sequences: 3, passed sequences: 3 (100.0%)
INFO | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> Filtering completed. Total sequences: 3, passed sequences: 1 (33.3%)
INFO | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> Filtering completed. Total sequences: 3, passed sequences: 1 (33.3%)
INFO | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> Filtering completed. Total sequences: 3, passed sequences: 3 (100.0%)
ERROR | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> Output file 'C:\Users\cinna\AppData\Local\Temp\pytest-of-cinna\pytest-13\test_file_exists_error0\output.fastq' already exists.
ERROR | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> Error during filtering: Output file 'C:\Users\cinna\AppData\Local\Temp\pytest-of-cinna\pytest-13\test_file_exists_error0\output.fastq' already exists.
Traceback (most recent call last):
File "C:\Users\cinna\OneDrive\Desktop\BioFilterToolsPro\src\BioFilterToolsPro.py", line 441, in filter_fastq
raise FileExistsError(error_message)
FileExistsError: Output file 'C:\Users\cinna\AppData\Local\Temp\pytest-of-cinna\pytest-13\test_file_exists_error0\output.fastq' already exists.
INFO | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> GC bounds converted to tuple (0, 50.0)
INFO | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> Filtering completed. Total sequences: 3, passed sequences: 2 (66.7%)
INFO | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> Length bounds converted to tuple (0, 50)
INFO | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> Filtering completed. Total sequences: 3, passed sequences: 3 (100.0%)
INFO | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> GC bounds converted to tuple (0, 50.0)
INFO | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> Length bounds converted to tuple (0, 50)
INFO | 2025-04-16 18:05:37 --> BioFilterToolsPro filter_fastq --> Filtering completed. Total sequences: 3, passed sequences: 1 (33.3%)
Binary file removed pytest_hw4.png
Binary file not shown.
Binary file modified requirements.txt
Binary file not shown.
Loading