Skip to main content

FruitFly4

Introduction

This package contains a set of minimal eukaryotic genome and transcriptome datasets from chromosme r of Drosophila melanogaster. They may, for example, be useful for rapidly testing a RNA-seq bioinformatics pipeline.

Installation

Ensure your computing environment includes Python 3.11 or later and the following bioinformatics tools:

  • sra-tools
  • pigz
  • fastp
  • kraken2

Conda is useful for setting up this environment. Then, fruitfly4 can be installed with Pip:

conda create -c conda-forge -c bioconda -n fruitfly4 \
  biopython pysradb sra-tools pigz fastp kraken2
conda activate fruitfly4
pip install fruitfly4

Usage

Run fruitfly4 without arguments to list the help text of all subcommands

fruitfly4
usage: fruitfly4 [-h] [--version] {init,path,metadata,download,sheet,trim,classify} ...

Small dataset of fruit fly chromosome 4

positional arguments:
  {init,path,metadata,download,sheet,trim,classify}
    init                fully initialize the dataset by downloading, trimming, and classifying RNA-seq reads
    path                show paths to data directory and files
    metadata            fetch sra metadata
    download            download RNA-seq reads
    sheet               sample sheet for fruitfly4 rna-seq dataset
    trim                trim downloaded reads
    classify            classify downloaded reads

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit

To download and downsample all RNA-seq data, run:

fruitfly4 init

Use fruitfly4 path to get the absolute path for a data file

fruitfly4 path data-dir
fruitfly4 path genome
fruitfly4 path cds
fruitfly4 path pep
fruitfly4 path gff
fruitfly4 path gtf
fruitfly4 path sheet

fruitfly4 path can also fetch paths to datasets for the two alternate species:

fruitfly4 path genome-dmauri
fruitfly4 path genome-dseche

To see the sample sheet listing the locations of the RNA-seq reads:

fruitfly4 sheet

If you need the data at another location, you can symbolically link to the fruitfly4 dataset, or copy the contents to another directory

ln -s `fruitfly4 path data-dir` test_data/
cp -r `fruitfly4 path data-dir` test_data/

To see the SRA metadata of the RNA-seq reads:

fruitfly4 metadata

To execute the initialization steps individually:

fruitfly4 download
fruitfly4 trim
fruitfly4 classify

Datasets

fruitfly4-datasets.png

There are two groups of datasets:

  1. The directly included package data of chromosome r sequence and annotation from D. melanogaster assembly DM6 at NCBI, including:

  2. The RNA-seq reads from Bajgiran et al. (2021), which are downloaded from SRA/NCBI BioProject PRJNA718442 and downsampled to include only chromosome 4 reads by running an included script.

    • The study sequenced mRNA from D. melanogaster at ages 1 day and 60 days.

Downsampling RNA-seq

fruitfly4-init.png

During the initialization process, after the RNA-seq reads are downloaded they are downsampled by:

  1. Adapter and quality trimming with fastp
  2. Classification with kraken2 to filter out all reads that do not match chromosome I

Configuration

You can configure some fruitfly4 settings using environment variables or a TOML file.

Environment variables

export FRUITFLY4_DOWNLOAD_DIR = /absolute/path/to/directory/
export FRUITFLY4_TAXID = <integer>
export FRUITFLY4_SAMPLE_SHEET = /absolute/path/to/sample_sheet.csv
export FRUITFLY4_KRAKEN2_DB /absolute/path/to/kraken2_db/

Config file

By default, fruitfly4 looks for configuration in TOML format at $HOME/.fruitfly4.toml

download_dir = /absolute/path/to/directory/
taxid = <integer>
sample_sheet = /absolute/path/to/sample_sheet.csv
kraken2_db = /absolute/path/to/kraken2_db/

The location of the config file can also be set using an environment variable:

export FRUITFLY4_CONFIG_FILE=/absolute/path/to/alternate/config.toml

Python API

FruitFly4 resources can also be accessed from within python:

import fruitfly4
fruitfly4.init()
fruitfly4.path('genome')
fruitfly4.path('genome-skud')
metadata = fruitfly4.metadata()
sample_sheet = fruitfly4.create_sample_sheet(metadata)
fruitfly4.write_sample_sheet(sample_sheet, 'sample_sheet.csv')
fruitfly4.download()
fruitfly4.trim('reads_1.fastq.gz', 'reads_2.fastq.gz')
fruitfly4.classify('reads_1.fastq.gz', 'reads_2.fastq.gz')
fruitfly4.taxid
fruitfly4.busco

Example usage with nf-core pipelines

Conda environment

conda create -c conda-forge -c bioconda -n fruitfly4-nf-core \
  biopython pysradb sra-tools pigz fastp kraken2 nextflow nf-core
conda activate fruitfly4-nf-core
pip install fruitfly4

nf-core/genomeqc

echo '{"is_plant": false, "skip_busco": false, "skip_tidk": false}' > genomeqc-params.json
fruitfly4 sheet --pipeline nf-core-genomeqc > sample_sheet.csv
nextflow run nf-core/genomeqc -r 1.0.1 \
  -profile <docker/singularity/.../institute> \
  -params-file genomeqc-params.json \
  --input sample_sheet.csv \
  --outdir genomeqc_output_dir/ \
  --busco_lineage `fruitfly4 busco`

nf-core/seqinspector

fruitfly4 sheet --pipeline nf-core-seqinspector > sample_sheet.csv
nextflow run nf-core/seqinspector \
  -profile <docker/singularity/.../institute> \
  --input sample_sheet.csv \
  --outdir seqinspector_output_dir/

nf-core/seqinspector

fruitfly4 sheet --pipeline nf-core-seqinspector > sample_sheet.csv
nextflow run nf-core/seqinspector \
  -profile <docker/singularity/.../institute> \
  --input sample_sheet.csv \
  --outdir seqinspector_output_dir/ \
  --fasta `fruitfly4 path genome`

nf-core/rnaseq

fruitfly4 sheet > sample_sheet.csv
nextflow run nf-core/rnaseq \
  -profile <docker/singularity/.../institute> \
  --input sample_sheet.csv \
  --outdir rnaseq_output_dir/ \
  --fasta `fruitfly4 path genome` \
  --gtf `fruitfly4 path gtf`

nf-core/denovotranscript

fruitfly4 sheet > sample_sheet.csv
nextflow run nf-core/denovotranscript -r 1.2.1 \
  -profile <docker/singularity/.../institute> \
  --input sample_sheet.csv \
  --outdir denovotranscript_output_dir/ \
  --assemblers rnaspades

Metadata

Release files for fruitfly4 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fruitfly4 0.1.2
File Size Uploaded Provenance Actions
fruitfly4-0.1.2.tar.gz 7.5 MB Without provenance Details for fruitfly4-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fruitfly4 0.1.2
File Interpreter ABI Platform Actions
fruitfly4-0.1.2-py3-none-any.whl Python 3 none any Details for fruitfly4-0.1.2-py3-none-any.whl

Total release size: 15.0 MB

Release files / fruitfly4-0.1.2.tar.gz

Download URL fruitfly4-0.1.2.tar.gz
Size 7.5 MB
Tags Source
SHA-256 checksum
How to use checksums
9a586379531e8e24db5a51e4d0fe610535b89b200b0263a69b1d79b4928ef50a
BLAKE2b-256 checksum
How to use checksums
2da40e3b1b20d0b97139df11a62c2e4aaad6a187cea1013b3160b73bc60fe006
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Release files / fruitfly4-0.1.2-py3-none-any.whl

Download URL fruitfly4-0.1.2-py3-none-any.whl
Size 7.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
eb2d21da3ce62fd62193a30e8ddf536fb16c058058ee66227dbf99a3f782ba6d
BLAKE2b-256 checksum
How to use checksums
219d719d960a34a5c51c196478f6a94f02b08aa65e2da500ca9ca8da3babb762
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Security for fruitfly4 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page