Misc functions for metagenomics pipelines
Project description
MetaSnek
Misc functions for metagenomic pipelines
Examples
fastq_finder
Return a python dictionary of sample names and fasta/q files from a directory or a TSV file. If given a directory, sample names will be everything upto the first match for "_R1|_R2".
samples.tsv
sample1 reads/sample1_R1.fastq.gz reads/sample1_R2.fastq.gz
sample2 reads/sample1_R2.fastq reads/sample2_R2.fastq
sample3 reads/sample3.fasta.gz None
reads/
reads
├── sample1_R1.fastq.gz
├── sample1_R2.fastq.gz
├── sample2_R1.fastq
├── sample2_R2.fastq
└── sample3.fasta.gz
from metasnek import fastq_finder
samples = fastq_finder.parse_samples_to_dictionary("reads")
samples = fastq_finder.parse_samples_to_dictionary("samples.tsv")
samples
{
'sample1':
{
'R1': 'reads/sample1_R1.fastq.gz',
'R2': 'reads/sample1_R2.fastq.gz',
},
'sample2':
{
'R1': 'reads/sample2_R1.fastq',
'R2': 'reads/sample2_R2.fastq'
}
'sample3':
{
'R1': 'reads/sample3.fasta.gz',
'R2': None
}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
metasnek-0.0.3.tar.gz
(5.8 kB
view details)
Built Distribution
File details
Details for the file metasnek-0.0.3.tar.gz
.
File metadata
- Download URL: metasnek-0.0.3.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8370f22134d3681d1ecae21e8e0f9f1fd5683faa8f718dc2addb40504601d76 |
|
MD5 | 91d4676cb1351413884b219a348d2194 |
|
BLAKE2b-256 | 0ee8b78ceddc2b0ddda9c4fbfe34dbdeb332b4b015f7aba4b68445552506233f |
File details
Details for the file metasnek-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: metasnek-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f671538734e5f9378b7de9bc62ad0382bf79cc5470901730fbbe4adab3ea6623 |
|
MD5 | ef7a182e6565c89b97d34b8c714b1db0 |
|
BLAKE2b-256 | d5f73403dbb21cb0f9023616a8f1ee31886d0a7a74f5c3df3e7d7e0d4ecfafe4 |