Entering edit mode
5.4 years ago
marongiu.luigi
▴
730
Probably this is not the best forum for this question, but perhaps somebody is using bionformatic tools usually run in bash using Julia.
I would like to extract some portions of an aligned file using samtools and launch samtools via Julia. The command to run bash in Julia is run(<command>
). Pretty easy. It can also take variables passed as run(<command> $<var>
).
So I created these variables:
julia> r_file
"A3-T_F-AlnSrtDed.bam"
julia> r_locus
"chr1:254748988-254749089"
then run with
julia> query = run(`samtools view -h -q 10 -f67 -F1408 $r_file $r_locus`)
[E::hts_open_format] Failed to open file A3-T_F-AlnSrtDed.bam
samtools view: failed to open "A3-T_F-AlnSrtDed.bam" for reading: No such file or directory
ERROR: failed process: Process(`samtools view -h -q 10 -f67 -F1408 A3-T_F-AlnSrtDed.bam chr1:254748988-254749089`, ProcessExited(1)) [1]
Stacktrace:
[1] pipeline_error at ./process.jl:705 [inlined]
[2] #run#503(::Bool, ::Function, ::Cmd) at ./process.jl:663
[3] run(::Cmd) at ./process.jl:661
[4] top-level scope at none:0
Did anybody experience this sort of errors? What was the fix?
Thank you