Skip to content

Commit

Permalink
Merge pull request #374 from andrewjpage/bedtools_name
Browse files Browse the repository at this point in the history
Bedtools getfasta format fix
  • Loading branch information
andrewjpage committed Jan 10, 2018
2 parents 42c1ece + e565029 commit 9c2d391
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ The code will not work with perl 5.8 or below (pre-modern perl). We no longer te
* cdhit 4.6.1
* ncbi blast+ 2.4.0
* mcl 14-137
* bedtools 2.26.0
* bedtools 2.27.1
* prank 130410
* GNU parallel 20130922, 20160722, 20150122
* FastTree 2.1.9
2 changes: 1 addition & 1 deletion dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ author = Andrew J. Page <ap13@sanger.ac.uk>
license = GPL_3
copyright_holder = Wellcome Trust Sanger Institute
copyright_year = 2013
version = 3.11.0
version = 3.11.1
main_module = lib/Bio/Roary.pm

[MetaResources]
Expand Down
2 changes: 1 addition & 1 deletion install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PARALLEL_VERSION=${PARALLEL_VERSION:-"20160722"}
PARALLEL_DOWNLOAD_FILENAME="parallel-${PARALLEL_VERSION}.tar.bz2"
PARALLEL_URL="http://ftp.gnu.org/gnu/parallel/${PARALLEL_DOWNLOAD_FILENAME}"

BEDTOOLS_VERSION="2.26.0"
BEDTOOLS_VERSION="2.27.1"
BEDTOOLS_DOWNLOAD_FILENAME="bedtools-${BEDTOOLS_VERSION}.tar.gz"
BEDTOOLS_URL="https://github.com/arq5x/bedtools2/releases/download/v${BEDTOOLS_VERSION}/${BEDTOOLS_DOWNLOAD_FILENAME}"

Expand Down
9 changes: 7 additions & 2 deletions lib/Bio/Roary/ExtractProteomeFromGFF.pm
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,13 @@ sub _cleanup_fasta {
open( my $in, '<', $infile );
open( my $out, '>', $outfile );
while ( my $line = <$in> ) {
chomp $line;
$line =~ s/"//g if ( $line =~ /^>/ );
chomp $line;
if ( $line =~ /^>/ )
{
$line =~ s/"//g;
# newer versions of Bedtools add (-) or (+) to the end of the sequence name, remove them
$line =~ s!\([-+]\)!!;
}

if($line =~ /^(>[^:]+)/)
{
Expand Down
7 changes: 6 additions & 1 deletion lib/Bio/Roary/Output/GroupsMultifastaNucleotide.pm
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,12 @@ sub _cleanup_fasta {
open( my $out, '>', $outfile );
while ( my $line = <$in> ) {
chomp $line;
$line =~ s/"//g if ( $line =~ /^>/ );
if ( $line =~ /^>/ )
{
$line =~ s/"//g ;
# newer versions of Bedtools add (-) or (+) to the end of the sequence name, remove them
$line =~ s!\([-+]\)!!;
}

if($line =~ /^(>[^:]+)/)
{
Expand Down

0 comments on commit 9c2d391

Please sign in to comment.