这是cwd中的内容:
blastn_build.sh qscript
它们当前都设置为可执行(但不是二进制)
以下是blastn_build.sh的内容:
#!/bin/bash
update_blastdb.pl --showall
以下是qscript的内容:
qsub -S /bin/bash -V -b n -N nt_wgs_build -pe smp 8 -j y -o ./nt_wgs_build.sge -l h=n10 -cwd -sync y "./blastn_build.sh"
update_blastdb.pl在我的PATH中,以#!/ usr / bin / perl
开头现在出现问题:
运行./blastn_build.sh按预期工作。 运行./qscript不会......这是错误消息:
无法连接到ftp.ncbi.nlm.nih.gov:参数无效
如果我从./blastn_build.sh中删除了--showall参数,那么BOTH ./blastn_build.sh和./qscript按预期工作。问题似乎在于如何通过qsub正确地将--showall选项传递给update_blastdb.pl。
非常感谢任何帮助理解和修复!
update_blastdb.pl(blast-2.2.31 http://www.ncbi.nlm.nih.gov/books/NBK52640/) wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/LATEST/ncbi-blast-2.2.31+-x64-linux.tar.gz
#!/usr/bin/perl
# $Id: update_blastdb.pl 446090 2014-09-11 12:12:27Z ivanov $
===========================================================================
#
# Author: Christiam Camacho
#
# File Description:
# Script to download the pre-formatted BLAST databases from the NCBI ftp
# server.
#
#
use strict;
use warnings;
use Net::FTP;
use Getopt::Long;
use Pod::Usage;
use File::stat;
use Digest::MD5;
use Archive::Tar;
use List::MoreUtils qw(uniq);
use constant NCBI_FTP => "ftp.ncbi.nlm.nih.gov";
use constant BLAST_DB_DIR => "/blast/db";
use constant USER => "anonymous";
use constant PASSWORD => "anonymous";
use constant DEBUG => 0;
use constant MAX_DOWNLOAD_ATTEMPTS => 3;
use constant EXIT_FAILURE => 2;
# Process command line options
my $opt_verbose = 1;
my $opt_quiet = 0;
my $opt_force_download = 0;
my $opt_help = 0;
my $opt_passive = 0;
my $opt_timeout = 120;
my $opt_showall = 0;
my $opt_show_version = 0;
my $opt_decompress = 0;
my $result = GetOptions("verbose+" => \$opt_verbose,
"quiet" => \$opt_quiet,
"force" => \$opt_force_download,
"passive" => \$opt_passive,
"timeout=i" => \$opt_timeout,
"showall" => \$opt_showall,
"version" => \$opt_show_version,
"decompress" => \$opt_decompress,
"help" => \$opt_help);
$opt_verbose = 0 if $opt_quiet;
die "Failed to parse command line options\n" unless $result;
pod2usage({-exitval => 0, -verbose => 2}) if $opt_help;
pod2usage({-exitval => 0, -verbose => 2}) unless (scalar @ARGV or
$opt_showall or
$opt_show_version);
#rest of code continues...
perl v 5.10.1
答案 0 :(得分:0)
看起来你实际上在某个群集环境中工作(或者还有什么是qsub?)。在这样的地方你的qsubed脚本实际上运行在不同的节点上,它可以没有互联网连接,可以从不同的目录开始执行你的脚本,或者可以从旅游原始主机中进行许多其他错误配置......