Skip to content

Commit

Permalink
Merge pull request #7 from stjude/wrapper
Browse files Browse the repository at this point in the history
updated README
  • Loading branch information
madetunj authored Apr 7, 2020
2 parents 0409a7e + 1c205a6 commit 6301412
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 111 deletions.
46 changes: 32 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,50 @@ CLONED using SOURCETREE from: https://bitbucket.org/young_computation/rose/src/m
#### === Changelog
1. USAGE

- Option 1: To run the program locally and independent of software location by calling ROSE-local.sh
NB: First open ROSE-local.sh and modify PATHTO with the PATH ROSE is installed in.
> ROSE-local.sh ["GTF file"] ["BAM file"] ["OutputDir"] ["feature type"] ["species"] ["bed fileA"] ["bed fileB"]

- Option 2: Add ROSE to user executable $PATH
```bash
PATHTO=/path/to/ROSE
PYTHONPATH=$PATHTO/lib
export PYTHONPATH
export PATH=$PATH:$PATHTO/bin
```
```bash
PATHTO=/path/to/ROSE
PYTHONPATH=$PATHTO/lib
export PYTHONPATH
export PATH=$PATH:$PATHTO/bin

ROSE_main.py [options] -g [GENOME] -i [INPUT_REGION_GFF] -r [RANKBY_BAM_FILE] -o [OUTPUT_FOLDER] [OPTIONAL_FLAGS]
```

1. Update:

* ROSE is executable independent of software directory location.
* ROSE has a wrapper script "ROSE-local.sh" to successfully execute all steps of the package, else add ROSE to user executable $PATH
* ROSE is compatible with python3

1. REQUIREMENTS:

1. All files :
All input files much be in one directory.

1. Annotation file :
Annotation file should be in UCSC table track format (https://genome.ucsc.edu/cgi-bin/hgTables).
Annotation file should be saved as [GENOME]_refseq.ucsc (example: hg19_refseq.ucsc).
Annotation file should be in annotation/ folder in the input files directory.

1. BAM files (of sequencing reads for factor of interest and control) :
Files must have chromosome IDs starting with "chr"
Files must be sorted and indexed using SAMtools in order for bamToGFF.py to work. (http://samtools.sourceforge.net/samtools.shtml)

1. Peak file of constituent enhancers :
File must be in GFF format with the following columns:
1: chromosome (chr#)
2: unique ID for each constituent enhancer region
4: start of constituent
5: end of constituent
7: strand (+,-,.)
9: unique ID for each constituent enhancer region
NOTE: if value for column 2 and 9 differ, value in column 2 will be used

1. DIRECTORY structure
```
├── LICENSE.txt
├── README.md
├── ROSE-local.sh : bash wrapper
├── bin
│   ├── ROSE_bamToGFF.py : calculates density of .bam reads in .gff regions
│   ├── ROSE_callSuper.R : ranks regions by their densities, creates cutoff
Expand Down
13 changes: 7 additions & 6 deletions ROSE-local.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Rose Caller to detect both Enhancers and Super-Enhancers
#
# Hardcoded implementation of ROSE for St. Jude, Abraham's lab.
# Version 1 11/16/2019

##############################################################
Expand Down Expand Up @@ -38,7 +38,7 @@ FEATURE=${FEATURE:=gene}

# Species
SPECIES=$5
SPECIES=${SPECIES:=hg_19}
SPECIES=${SPECIES:=hg19}

# Bed File A
FILEA=$6
Expand Down Expand Up @@ -67,7 +67,8 @@ echo "Species: $SPECIES"
echo "Feature type: $FEATURE"
#================================================================================
#
# GENERATING UCSC REFSEQ FILE
# UCSC TRACK FORMAT ANNOTATION FILE
# Generate UCSC table track annotation file using NCBI GTF refseq.
#
mkdir -p annotation
echo -e "#bin\tname\tchrom\tstrand\ttxStart\ttxEnd\tcdsStart\tcdsEnd\tX\tX\tX\t\tX\tname2" > annotation/$SPECIES"_refseq.ucsc"
Expand All @@ -85,14 +86,14 @@ fi
echo "Annotation file: "$SPECIES"_refseq.ucsc"

#
# GENERATING MERGE BED FILES
#
# INPUT CONSTITUENT FILE
# merge peak bed files generated from MACS1 "keep_dup=all" and "keep_dup=auto" to generate constituent enhancers.
cat $FILEA $FILEB | sort -k1,1 -k2,2n | mergeBed -i - | awk -F\\t '{print $1 "\t" NR "\t\t" $2 "\t" $3 "\t\t.\t\t" NR}' > unionpeaks.gff
echo "Merge Bed file: unionpeaks.gff"
echo

#
# ROSE CALLER
# ROSE
#
ROSE_main.py -s $STITCH -t $TSS -g $SPECIES -i unionpeaks.gff -r $BAMFILE -o $OUTPUTDIR

Expand Down
91 changes: 0 additions & 91 deletions bin/ROSE-call.sh

This file was deleted.

0 comments on commit 6301412

Please sign in to comment.