GithubHelp home page GithubHelp logo

ggirelli / gpseq-radical Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 52 KB

R script for fast and streamlined Radiality Calculation from GPSeq data.

License: MIT License

R 100.00%
gpseq genome-architecture sequencing-data bioinformatics hacktoberfest

gpseq-radical's Introduction

GPSeq-RadiCal

DOI

R script for fast and streamlined Radiality Calculation from GPSeq data. GPSeq-RadiCal aims to provide the same functionalities as the gpseqc Python3 package, but with much lower memory usage and faster computation times.

Installation

  • Tested on R v3.6.3.
  • Required packages: argparser, data.table, logging, outliers, pbapply, rtracklayer.

The script checks automatically for the required packages.
When packages are missing, it provides the code to install the missing ones, one by one.

Usage

First, prepare a tabulation-separated metadata file with four columns:

  • exid: sequencing run ID.
  • cond: condition description (e.g., time and/or concentration).
  • libid: library ID.
  • fpath: full absolute path to bed file. Bed files can be gzipped (recommended).

The bed files should be reported in order of condition strength, with the top rows being weaker than bottom ones. Also, the first line should contain the column headers. An example metadata file can be found here.

Then, to run with default parameters, execute the following command:

./gpseq-radical.R example_meta.tsv output_folder

Replacing example_meta.tsv with your metadata file path, and output_folder with the path where the script should write the output. Note that the specified output folder must not already exist.

To access the script help page, run the following:

./gpseq-radical.R -h

Differences from gpseqc

  • Allows for normalization in a chromosome-wise fashion too, instead of only library-wise.
  • Normalization factors are calculated after outlier removal, not before.
  • Masking is performed before binning, but after the normalization factors are calculated. In this way, reads from masked regions still count for normalization purposes, while they are masked out from chromosome-wide analysis.

Desired features

  • Re-running on the same output folder to populate with additional resolutions.
  • Additional centrality estimates (currently calculates only the one selected in the GPSeq study).

Contributing

We welcome any contributions to GPSeq-RadiCal. Please, refer to the contribution guidelines if this is your first time contributing! Also, check out our code of conduct.

License

MIT License
Copyright (c) 2020 Gabriele Girelli

References

  • Girelli, Gabriele, et al. "GPSeq reveals the radial organization of chromatin in the cell nucleus." Nature Biotechnology (2020): 1-10. Genomic loci Positioning by Sequencing (GPSeq) original paper.

gpseq-radical's People

Contributors

ggirelli avatar

Stargazers

 avatar

Watchers

 avatar

gpseq-radical's Issues

[BUG] --ref-genome flag does not work

./GPSeq-RadiCal-0.0.9/gpseq-radical.R "$metadata" /home/${run_id}/test \
>        --chromosome-wide -b 1e6:1e5,5e5:5e4,1e5:1e4,5e4:5e4,25e3:25e3 \
>        --normalize-by lib \
>        --ref-genome mm10 --chrom-tag 19:X,Y \
>        --threads 6 --export-level 1 \
>        --site-domain universe --site-bed "$cutsite_path" \
>        --mask-bed "$mask_path"
2022-03-23 14:04:50 INFO::This log will be stored at '/home/WW319/test/gpseq-radical.log'.
2022-03-23 14:04:50 INFO::Created output folder '/home/WW319/test'.
2022-03-23 14:04:50 INFO::Exported input parameters to '/home/WW319/test/gpseq-radical.opts.rds'.
2022-03-23 14:04:50 INFO::Parsing metadata from '/home/B319_centrality_GPSeq_meta.tsv'.
2022-03-23 14:04:50 INFO::Storing metadata.
2022-03-23 14:04:50 INFO::Opening UCSC browser session...
2022-03-23 14:05:00 INFO::Querying UCSC for 'mm10' chromosome info...
Loading required package: BiocGenerics

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: ‘S4Vectors’

The following objects are masked from ‘package:base’:

    expand.grid, I, unname

Error in h(simpleError(msg, call)) :
  error in evaluating the argument 'object' in selecting a method for function 'getTable': Table 'chromInfo' is unavailable
Calls: <Anonymous> ... tableName<- -> tableName<- -> .local -> normArgTable
Execution halted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.