Skip to main content

No project description provided

Project description

Coral (c-core)


Docker image build

Building your own docker image is optional. You can use the pre-built image from docker hub.

docker build . -t coral -f dockerfile/Dockerfile

Running from built docker image

docker run --rm -v ".\data:/data" coral -u "/data/For_Curtain_Raw_PPM1H- PROTAC_TP.txt"  -a "/data/annotation.txt"-o "/data/output.txt" -c "/data/comparison.txt" -x "T: Index,T: Gene"

Running from docker hub image

docker run --rm -v ".\data:/data" noatgnu/coral:0.0.1 -u "/data/For_Curtain_Raw_PPM1H- PROTAC_TP.txt"  -a "/data/annotation.txt"-o "/data/output.txt" -c "/data/comparison.txt" -x "T: Index,T: Gene"

Pip install

Install R and set R_HOME environment variable to the R installation directory as well as install the QFeatures package and its dependencies.

pip install ccore-coral

Running from pip install

coral -u "/data/For_Curtain_Raw_PPM1H- PROTAC_TP.txt"  -a "/data/annotation.txt"-o "/data/output.txt" -c "/data/comparison.txt" -x "T: Index,T: Gene"

CLI Usage

usage: coral [-h] [-u unprocessed] [-a annotation] [-o output] [-c comparison] [-x index] [-f column_na_filter_threshold] [-r row_na_filter_threshold] [-i imputation_method] [-n normalization_method] [-g aggregation_method] [-t aggregation_column]
    -u unprocessed, --unprocessed unprocessed
                        Filepath to the unprocessed data file.
    -a annotation, --annotation annotation
                        Filepath to the annotation file.
    -o output, --output output
                        Filepath to the output file.
    -c comparison, --comparison comparison
                        Filepath to the comparison file.
    -x index, --index index
                        Column names to be used as index.
    -f column_na_filter_threshold, --column_na_filter_threshold column_na_filter_threshold
                        Threshold for column-wise NA filtering.
    -r row_na_filter_threshold, --row_na_filter_threshold row_na_filter_threshold
                        Threshold for row-wise NA filtering.    
    -i imputation_method, --imputation_method imputation_method
                        Method for imputation.
    -n normalization_method, --normalization_method normalization_method
                        Method for normalization.
    -g aggregation_method, --aggregation_method aggregation_method
                        Method for aggregation.
    -t aggregation_column, --aggregation_column aggregation_column
                        Column name to be used for aggregation.

Usage as a module

import pandas as pd
from coral.data import Coral

core = Coral()
# Read in the unprocessed data
core.load_unproccessed_file("data/For_Curtain_Raw_PPM1H- PROTAC_TP.txt")
# Add sample column names
core.add_sample("...")
# Add condition or group names
core.add_condition("...")
# Add sample group mapping
core.add_condition_map("condition_name", "sample_name")
# Add comparison
core.add_comparison("condition_A", "condition_B", "comparison_name")
# Add index columns
core.index_columns = ["index_column_name"]
# Filter column by NA
core.filter_missing_columns(0.7)
# Create QFeatures object
core.prepare()
# Filter row by NA
core.filter_missing_rows(0.7)
# Impute missing values
core.impute("knn")
# log2 transform
core.log_transform()
# aggregate features
core.aggregate_features("new_feature_column")
# normalize
core.normalize()
# Prepare limma matrix
core.prepare_for_limma()
# Run limma
results = []
for d in core.run_limma():
    results.append(d)
if len(results) > 1:
    # Merge limma results
    results = pd.concat(results)
else:
    results = results[0]
# Write results
results.to_csv("output.txt", sep="\t", index=False)

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

ccore_coral-0.1.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

ccore_coral-0.1.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file ccore_coral-0.1.2.tar.gz.

File metadata

  • Download URL: ccore_coral-0.1.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10

File hashes

Hashes for ccore_coral-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b05f284b731f0a932e1a6f92a8c1bdc5d74220dbdc210e183e37aa5e2b34a10f
MD5 50f5f6406b2080823626f2af9e2c077e
BLAKE2b-256 3777d89783e22a0425907634064917a117539bbf048e540eccc6b0bffa079a6e

See more details on using hashes here.

File details

Details for the file ccore_coral-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ccore_coral-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10

File hashes

Hashes for ccore_coral-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9054a365948efedd255fe090bcba7c0e2df37d02dc9c8a4d2977232a800433b0
MD5 da36b3257744cf895223dae9b20b8563
BLAKE2b-256 a3a84218c404a1def328727de64d2d2e78b1f9bcb87bb7256d5256e28efa3e03

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page