Hello,
I am trying to run a shell-based bioinformatic tool via Julia. I created a file containing a text query and assigned it as a parameter to the aforementioned command (blastn). However, it looks like the file doe snot exist when it has been correctly created. I tired to assign the output of the command to an object, but the issue persist even by simply launching the command:
julia> q_file
"/home/gigiux/Downloads/h32/query.fa"
julia> readdir("/home/gigiux/Downloads/h32/")
14-element Array{String,1}:
"1_readSelection.sh"
"2_readCounter.jl"
"3_readPurger.jl"
"4_readHandler.jl"
"5_readWrapper.jl"
"6_nls.R"
"7_readConfirm.jl"
"confirm"
"counts"
"deNovo"
"plot"
"query.fa" ### here it is
"rslt"
"src"
julia> hit = chop(read(pipeline(`blastn -db /home/gigiux/refSeq/fusion/fusion38-10k \
-max_target_seqs 5 -max_hsps 1 -outfmt '6 qseqid sseqid evalue bitscore pident sacc' \
-query q_file`), String))
ERROR: IOError: could not spawn `blastn -db /home/gigiux/refSeq/fusion/fusion38-10k '
' -max_target_seqs 5 -max_hsps 1 -outfmt '6 qseqid sseqid evalue bitscore pident sacc' '
' -query q_file`: no such file or directory (ENOENT) ###
Stacktrace:
[1] _jl_spawn(::String, ::Array{String,1}, ::Cmd, ::Tuple{Base.DevNull,Base.PipeEndpoint,Base.TTY}) at ./process.jl:367
[2] (::getfield(Base, Symbol("##493#494")){Cmd})(::Tuple{Base.DevNull,Base.PipeEndpoint,Base.TTY}) at ./process.jl:509
[3] setup_stdio(::getfield(Base, Symbol("##493#494")){Cmd}, ::Tuple{Base.DevNull,Pipe,Base.TTY}) at ./process.jl:490
[4] #_spawn#492(::Nothing, ::Function, ::Cmd, ::Tuple{Base.DevNull,Pipe,Base.TTY}) at ./process.jl:508
[5] _spawn(::Cmd, ::Tuple{Base.DevNull,Pipe,Base.TTY}) at ./process.jl:504
[6] #open#502(::Bool, ::Bool, ::Function, ::Cmd, ::Base.DevNull) at ./process.jl:594
[7] open at ./process.jl:584 [inlined]
[8] open(::Cmd, ::String, ::Base.DevNull) at ./process.jl:565
[9] read(::Cmd) at ./process.jl:634
[10] read(::Cmd, ::Type{String}) at ./process.jl:645
[11] top-level scope at none:0
julia> run(`blastn -db /home/gigiux/refSeq/fusion/fusion38-10k \
-max_target_seqs 5 -max_hsps 1 -outfmt '6 qseqid sseqid evalue bitscore pident sacc' \
-query q_file`)
ERROR: IOError: could not spawn `blastn -db /home/gigiux/refSeq/fusion/fusion38-10k '
' -max_target_seqs 5 -max_hsps 1 -outfmt '6 qseqid sseqid evalue bitscore pident sacc' '
' -query q_file`: no such file or directory (ENOENT)
Stacktrace:
[1] _jl_spawn(::String, ::Array{String,1}, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:367
[2] (::getfield(Base, Symbol("##493#494")){Cmd})(::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:509
[3] setup_stdio(::getfield(Base, Symbol("##493#494")){Cmd}, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:490
[4] #_spawn#492(::Nothing, ::Function, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:508
[5] _spawn at ./process.jl:504 [inlined]
[6] #run#503(::Bool, ::Function, ::Cmd) at ./process.jl:662
[7] run(::Cmd) at ./process.jl:661
[8] top-level scope at none:0
Why is the input file not recognized? it is a Julia issue or is down to the shell command?