Skip to content

Commit

Permalink
Merge pull request #14 from PatrickRWright/dev
Browse files Browse the repository at this point in the history
2.1.2
  • Loading branch information
Patrick R. Wright authored Nov 14, 2017
2 parents 175d827 + 900c377 commit a3777a3
Show file tree
Hide file tree
Showing 9 changed files with 23,648 additions and 23,025 deletions.
26 changes: 23 additions & 3 deletions CopraRNA2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Getopt::Long;
use Cwd 'abs_path'; ## edit 2.0.5.1

# CopraRNA 2.1.1
# CopraRNA 2.1.2

# License: MIT

Expand Down Expand Up @@ -95,6 +95,8 @@

#### changelog

# v2.1.2 : added R downstream ooi false positive removal
#
# v2.1.1 : added input exceptions
# DAVID python code now py2 and py3 compatible
# changed coloring in evolutionary heatmap
Expand Down Expand Up @@ -170,6 +172,7 @@
my $verbose = 0; ## edit 2.0.5.1
my $noclean = 0; ## edit 2.0.5.1
my $websrv = 0; ## edit 2.0.5.1
my $ooi_filt = 0; ## for copraRNA2_ooi_post_filtering.R
my $pvalcutoff = 0.15; # p-value cutoff for CopraRNA 2 // ## edit 2.0.5.1
my $topcount = 200; # amount of top predictions // ## edit 2.0.5.1
my $root = 1; # root function to apply to the weights // ## edit 2.0.5.1
Expand Down Expand Up @@ -202,12 +205,13 @@
'enrich:i' => \$enrich, # functional enrichment needs to be specifically turned on // also how many top preds to use for enrichment
'root:i' => \$root, # root function to apply to the weights ## edit 2.0.5.1
'cons:i' => \$cons, # consensus mode / 0=off, 1=ooi_cons, 2=overall_cons ## edit 2.0.6
'ooifilt:f' => \$ooi_filt, # for copraRNA2_ooi_post_filtering.R
);


if ($help) { ## edit 2.0.4 // added help and getopt

print "\nCopraRNA 2.1.1\n\n",
print "\nCopraRNA 2.1.2\n\n",

"CopraRNA is a tool for sRNA target prediction. It computes whole genome target predictions\n",
"by combination of distinct whole genome IntaRNA predictions. As input CopraRNA requires\n",
Expand Down Expand Up @@ -249,6 +253,7 @@
" --noclean switch to prevent removal of temporary files (def:off)\n", ## edit 2.0.5.1
" --enrich if entered then DAVID-WS functional enrichment is calculated with given amount of top predictions (def:off)\n", ## edit 2.0.5.1
" --nooi if set then the CopraRNA2 prediction mode is set not to focus on the organism of interest (def:off)\n", ## edit 2.0.6
" --ooifilt post processing filter for organism of interest p-value 0=off (def:0)\n",
" --root specifies root function to apply to the weights (def:1)\n",
" --topcount specifies the amount of top predictions to return and use for the extended regions plots (def:200)\n\n", ## edit 2.0.6

Expand Down Expand Up @@ -278,6 +283,9 @@
chomp $count_fa;
die("\nError: The input file ($sRNAs_fasta) seems to contain less than 3 sequences!\n\n") unless($count_fa>2);

# check for ooifilt <=1 and >= 0
die("\nError: ooifilt needs to be specified between 0 and 1. You set $ooi_filt\n\n") unless ($ooi_filt>=0 and $ooi_filt<=1);

# create warning for non empty run dir
my @dir_files = <*>; ## edit 2.0.5.1
my $file_count = scalar(@dir_files); ## edit 2.0.5.1
Expand Down Expand Up @@ -351,7 +359,8 @@
print WRITETOOPTIONS "enrich:" . $enrich . "\n";
print WRITETOOPTIONS "noclean:" . $noclean . "\n";
print WRITETOOPTIONS "cons:" . $cons . "\n"; ## edit 2.0.6
print WRITETOOPTIONS "version:CopraRNA 2.1.1\n"; ## edit 2.0.4.2
print WRITETOOPTIONS "ooifilt:" . $ooi_filt . "\n"; ##
print WRITETOOPTIONS "version:CopraRNA 2.1.2\n"; ## edit 2.0.4.2
close WRITETOOPTIONS;
# end write options

Expand Down Expand Up @@ -511,6 +520,17 @@
system "mv all_predictions/CopraRNA_result.csv .";
system "mv all_predictions/coprarna_websrv_table.csv ." if ($websrv);
}

# make an archive for the Rdata files
unless ($cop1) {
system "mkdir Rdata";
system "mv consensus_positions.Rdata Rdata";
system "mv conservation_table.Rdata Rdata";
system "mv interaction_positions.Rdata Rdata";
}

# zip evo_alignments folder to reduce file number
system "if [ -d evo_alignments ]; then zip -rmq evo_alignments evo_alignments 2>&1; fi";

# remove weights.warning if its empty
system "rm weights.warning" if (-z "weights.warning");
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CopraRNA [![GitHub](https://img.shields.io/github/tag/PatrickRWright/CopraRNA.svg)](https://github.com/PatrickRWright/CopraRNA) [![Bioconda](https://anaconda.org/bioconda/coprarna/badges/version.svg)](https://anaconda.org/bioconda/coprarna) [![Docker Repository on Quay](https://quay.io/repository/biocontainers/coprarna/status "Docker Repository on Quay")](https://quay.io/repository/repository/biocontainers/coprarna)
# CopraRNA [![GitHub](https://img.shields.io/github/tag/PatrickRWright/CopraRNA.svg)](https://github.com/PatrickRWright/CopraRNA/releases) [![Bioconda](https://anaconda.org/bioconda/coprarna/badges/version.svg)](https://anaconda.org/bioconda/coprarna) [![Docker Repository on Quay](https://quay.io/repository/biocontainers/coprarna/status "Docker Repository on Quay")](https://quay.io/repository/biocontainers/coprarna)
![CopraRNA](https://raw.githubusercontent.com/PatrickRWright/CopraRNA/master/copra_sRNA.jpg "CopraRNA")

**Phylogenetic target prediction for prokaryotic *trans*-acting small RNAs**
Expand All @@ -13,7 +13,8 @@ for any character and X stands for a digit between 0 and 9). Depending on sequen
or longer to compute. In most cases it is significantly faster. It is suggested to run CopraRNA
on a machine with at least 8 GB of memory.

Please note: Version 2.1.1 is currently experimental and changes are actively being pushed.
CopraRNA produces a lot of file I/O. It is suggested to run CopraRNA in a dedicated
empty directory to avoid unexpected behavior.

For testing or ad hoc use of CopraRNA, you can use its webinterface at the

Expand Down Expand Up @@ -47,8 +48,9 @@ The following topics are covered by this documentation:
<a name="install" />
# Installation

In order to use CopraRNA you can either install it directly via conda or
clone this github repository and install the dependencies individually.
In order to use CopraRNA you can either [install it directly via conda](#instconda) or
clone this github repository and install the dependencies individually.
It is also possible to run CopraRNA [via a provided Docker container](#biocontainer).

<br /><br />
<a name="deps" />
Expand Down Expand Up @@ -115,7 +117,7 @@ source activate coprarnaenv

## Usage via biocontainer (docker)

CopraRNA can be retrieved and used as docker container with all dependencies via [docker](https://docs.docker.com/engine/installation/). Once you have docker installed simply type:
CopraRNA can be retrieved and used as docker container with all dependencies via [docker](https://docs.docker.com/engine/installation/). Once you have docker installed simply type (with changed version):
```bash
docker run -i -t quay.io/biocontainers/coprarna:2.1.0--0 /bin/bash
```
Expand Down Expand Up @@ -162,6 +164,7 @@ The following options are available:
- `--noclean` : switch to prevent removal of temporary files (def:off)
- `--enrich` : if entered then DAVID-WS functional enrichment is calculated with given amount of top predictions (def:off)
- `--nooi` : if set then the CopraRNA2 prediction mode is set not to focus on the organism of interest (def:off)
- `--ooifilt` : post processing filter for organism of interest p-value 0=off (def:0)
- `--root` : specifies root function to apply to the weights (def:1)
- `--topcount` : specifies the amount of top predictions to return and use for the extended regions plots (def:200)

Expand All @@ -179,7 +182,7 @@ cd run
```
Here you can execute build_kegg2refseq.pl
```bash
./build_kegg2refseq.pl
../build_kegg2refseq.pl
```
which will download prokaryotes.txt from the
NCBI and process it into the files CopraRNA_available_organisms.txt and kegg2refseqnew.csv.
Expand Down
Loading

0 comments on commit a3777a3

Please sign in to comment.