Skip to content

Commit

Permalink
update to v2.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
oushujun committed May 20, 2020
1 parent bc211b9 commit 053d9b4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
4 changes: 1 addition & 3 deletions LTR_retriever
Expand Up @@ -5,7 +5,7 @@ use File::Basename;

##Supported dependent program versions (or up): GenomeTools/1.5.1, BLAST+/2.2.25, BLAST/2.2.25, HMMER/3.1b1, RepeatMasker/3.3.0, CDHIT/4.5.6, Tandem Repeats Finder 4.07b, and Perl 5.0.0

my $version="v2.8.6";
my $version="v2.8.7";
my $help="
##########################
### LTR_retriever $version ###
Expand Down Expand Up @@ -125,7 +125,6 @@ my $TEhmm="$script_path/database/TEfam.hmm";
my $miu="1.3e-8"; #neutral mutation rate of the target species (per bp per ya), e.g., rice: 1.3e-8 (Ma and Bennetzen 2004); mammal: 2.2e−9 (S. Kumar 2002); Drosophila: 1.6e-8 (Bowen and McDonald 2001);
my $step = "Init"; #start the program from a particular step. Default: Init (from the beginning).
my $threads=4;
#my $scn=''; #store screen output information

my $k=0;
my $argv='';
Expand Down Expand Up @@ -798,7 +797,6 @@ print "$date\tModule 5: Start to remove DNA TE and LINE transposases, and remove
`cat $index.ltrTE.stg3.cln.clean.exclude.child >> $genome.LTRlib.exclude.tgt`;

`mv $index.ltrTE.stg3.cln.clean.clean.clean $index.ltrTE`;
#`mv $index.ltrTE.stg3.cln.clean.clean $index.ltrTE`;

#generate clean pass.list without plant protein contamination
`perl $script_path/bin/output_by_list.pl 1 $index.ltrTE.pass.list 1 $index.ltrTE.stg3.cln.clean.exclude.father -ex > $index.ltrTE.pass.list.cln`;
Expand Down
20 changes: 13 additions & 7 deletions bin/output_by_list.pl
@@ -1,10 +1,10 @@
#!/usr/bin/env perl
use warnings;
use strict;

##Shujun Ou
##usage: $ perl output_by_list.pl target_file list_file > outfile

use warnings;
use strict;

my $usage="\n#usage: \$ perl output_by_list.pl DB_index_pos database LS_index_pos LIST [Exclusive]* [MSU_format] [FASTA_format] [version]> outfile
* [] parameters are optional.
Expand All @@ -16,6 +16,7 @@
output_by_list: program for extracting information in database by provided list
Author: Shujun Ou, Department of Horticulture, Michigan State University, East Lansing, MI, 48823, USA
Version: 1.5 2014/05/12
update: 1.6 2019/07/25
\n";

my $msuL=0;
Expand Down Expand Up @@ -45,11 +46,13 @@
s/^\s+//;
chomp;
my $loc=(split)[$list_pos];
next unless defined $loc;
$loc=~s/\|.*$//;
$loc=~s/\[.*\]//g;
if ($msuL){ #for MSU LOC position recognision
$loc=(split /:/, $loc)[1];
$loc=~s/\.\..*$//;
$loc=~s/#.*//;
$loc=~s/\.+$//;
$loc=~s/^.*[_:\-.]+([0-9]+)[_:\-.]+([0-9]+)$/$1..$2/;
}
$data{$loc}=undef;
}
Expand All @@ -60,13 +63,16 @@
s/>//g;
s/^\s+//;
my $pos=(split)[$data_pos];
next unless defined $pos;
if ($pos=~/pos/i){ print $_ }
$pos=~s/\[.*\]//g;
if ($pos=~/^([0-9]+),.*$/){$pos=$1}
my ($p1, $p2)=($1, $2) if $pos=~/(.*)\|(.*)$/;
my ($p1, $p2)=(0, 0);
($p1, $p2)=($1, $2) if $pos=~/(.*)\|(.*)$/;
if ($msuD){
$pos=(split /:/, $pos)[1];
$pos=~s/\.\..*$//;
$pos=~s/#.*//;
$pos=~s/\.+$//;
$pos=~s/^.*[_:\-.]+([0-9]+)[_:\-.]+([0-9]+)$/$1..$2/;
}
if (exists $data{$pos} or exists $data{$p1} or exists $data{$p2}){
if ($exclude==0){
Expand Down

0 comments on commit 053d9b4

Please sign in to comment.