Skip to content

Commit

Permalink
bug fixed: ignored parameter in stageone
Browse files Browse the repository at this point in the history
  • Loading branch information
xinehc committed Jun 4, 2022
1 parent 368d747 commit 6879fd4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ The change log of this version (June, 2022) includes:
+ We modified the 16s estimation process by changing minimap2 to bwa + blastn, as minimap2 does not work well for reads that are super short (e.g. below 100 bp, see [https://github.com/lh3/minimap2/issues/363#issuecomment-473387994](https://github.com/lh3/minimap2/issues/363#issuecomment-473387994)).
+ We fixed the version of diamond to 0.9.24 (and python to 3.7.\*), as the latest version of diamond (2.0.15) will gives ~10% more hits of USCMGs and ARGs. The sensitivity of the newer version of diamond is under evaluation. We hope to remove this constrain in future updates.
+ Bug fixed:
+ Fixed a bug that caused the worst hits (instead of the best) out of five being picked in stagetwo's blastn.
+ Fixed a bug in stageone caused USCMG being slightly overestimated.
+ Fixed a bug in stagetwo that caused some multi-component ARGs hits being ignored.
+ Fixed a bug that caused the worst hits (instead of the best) being picked in stagetwo's blastx when multiple candidates of ARGs can be found.
+ Fixed a bug that caused some multi-component ARGs hits being uncounted in stagetwo's aggregation process.
+ Fixed a bug in stageone that caused USCMG being slightly overestimated.
+ Fixed a bug in stageone that caused parameters -x -y -v being ignored.

## Installation
Conda (osx-64/linux-64):
Expand Down
16 changes: 6 additions & 10 deletions args_oap/argoap_pipeline_stageone_version3
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,26 @@ USE

#Get all the input parameters

getopts('i:o:n:f:m:x:y:v:hzq');
getopts('i:o:m:n:f:q:z:x:y:v:h');
if($opt_h || ($opt_i eq "") ){
die "$usage\n";
}

$opt_n ||= 1;
$opt_f ||="fq";
$opt_o ||= ".";
unless(-d $opt_o){
`mkdir $opt_o`;
}

$opt_x ||= 1e-10;
$opt_y ||= 3;
$opt_v ||= 45;

my $eval1 =$opt_x;
my $eval2 =$opt_y;
my $did = $opt_v; ##identity for diamond searching

unless(-d $opt_o){
`mkdir $opt_o`;
}

my $logF = "$opt_o/Log.txt";
my $date = localtime;
open(LOG, ">$logF") || die "Can not create Log.txt\n";
Expand All @@ -75,17 +76,12 @@ my $ggnr85blast ||= "$ublastxdir/DB/gg85.fasta";
my $KO30DMD ||= "$ublastxdir/DB/all_KO30.fasta.dmnd";
my $genekolist ||="$ublastxdir/DB/all_KO30_name.list";


##Get all the fastq in input dir
##Generate output script files for all fastq
$date =~ s/\s+/-/g;

my $o_sh = "$opt_o/ublastx_bash_$date.sh";
unless(-d $opt_o){
`mkdir $opt_o`;
}
open(BASH, ">$o_sh") || die "output dir can not write:\n";

my $count = 1;

##--------------------------------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions args_oap/args_oap.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ def parse_options(argv):
optional_one.add_argument('-n', help='number of threads, default 1', default=1)
optional_one.add_argument('-f', help='the format of processed files, default fq', default='fq')
optional_one.add_argument('-q', help='quality control of fastq sequences defualt not take effect, set to 1, then will do QC with fastp', default=0)
optional_one.add_argument('-z', help='whether the fq files were .gz format, if -z, then firstly gzip -d, default(none) ', default=False, action='store_true')
optional_one.add_argument('-z', help='whether the fq files were .gz format, if 1, then firstly gzip -d, default 0', default=0)
optional_one.add_argument('-x', help='evalue for searching 16S in usearch default 1e-10', default=1e-10)
optional_one.add_argument('-y', help='evalue for searching universal single copy marker gene default 3', default=3)
optional_one.add_argument('-v', help='the identity value for diamond to search the USCMGs default 0.45', default=0.45)
optional_one.add_argument('-v', help='the identity value for diamond to search the USCMGs default 45', default=45)

parser_stage_one.set_defaults(func=stage_one)

Expand Down
5 changes: 2 additions & 3 deletions args_oap/stage_one.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ def stage_one(options):
'-n', str(options.n),
'-f', options.f,
'-q', str(options.q),
'-z', str(options.z),
'-x', str(options.x),
'-y', str(options.y),
'-v', str(options.v)]

if options.z:
args.extend(['-z'])

subprocess.call(args)

0 comments on commit 6879fd4

Please sign in to comment.