ubuntu ボックスに mono をインストールし、C# を使用して他のいくつかの子プロセスを開始するプロセスを開始しようとしていますが、プログラムには非常に厳しい要件があり、環境変数の問題のために正しく開始されません。perl でバックティックを使用してプログラムを呼び出すと、正常に動作します。C# でバックティック関数をエミュレートする方法を教えてもらえますか?
System.Diagnostics.ProcessStartInfo ps = new System.Diagnostics.ProcessStartInfo("bash");//perl /home/casey/Downloads/rosetta3.4/rosetta_tools/fragment_tools/make_fragments.pl tempsequence.fa
ps.RedirectStandardInput=true;
ps.RedirectStandardOutput = true;
ps.RedirectStandardError = true;
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo = ps;
ps.UseShellExecute = false;
proc.Start();
proc.StandardInput.WriteLine("cd "+ projectfolder+"/"+projectname+" ; perl /home/casey/Downloads/rosetta3.4/rosetta_tools/fragment_tools/make_fragments.pl tempsequence.fa;exit;");
proc.WaitForExit();
これは、Perl で正常に動作する C# で実行したときに生成されるエラーです。
/home/casey/Downloads/sparks-x/bin/buildinp_query.sh: 4: [: /home/casey/Downloads/sparks-x: unexpected operator
/home/casey/Downloads/sparks-x/bin/psiblast.sh: 21: /home/casey/Downloads/sparks-x/bin/psiblast.sh: /blast/bin/blastpgp: not found
Traceback (most recent call last):
File "/home/casey/Downloads/sparks-x/bin/buildinp.py", line 255, in run1
buildinp(fphipsiss, fmat, finp)
File "/home/casey/Downloads/sparks-x/bin/buildinp.py", line 238, in buildinp
seq1, ssec1, phipsi1, Fphipsi = rdphipsi(fphipsiss)
File "/home/casey/Downloads/sparks-x/bin/buildinp.py", line 9, in rdphipsi
for line in file(fn):
IOError: [Errno 2] No such file or directory: 't001_.fasta.phipsi'
sparks failed!
no id specified. parsing filename instead.
INTERMEDIATE: tempsequence.fa
ID: t001 CHAIN: _
File for psipred not found! Generating from scratch instead.
picking fragments with options:
DEBUG: 1
add_pdbs_to_vall:
chain: _
cleanup: 1
exclude_homologs_by_pdb_date: 0
f: tempsequence.fa
fastafile: t001_.fasta
homs: 1
id: t001
n_candidates: 1000
n_frags: 200
old_name_format: 0
pick_frags: 1
porter: 0
porter_file:
psipred: 1
psipred_file:
rundir: /media/d5ad6bd2-65b3-498f-8355-5b2c55ee42b2/top10demo/automate/projects/showerror
runid: t001_
sam: 0
sam_file:
torsion_bin: 0
--------------------------------------------------------------------------------
FILENAME: t001_.fasta
Sequence: GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
running sparks for phi, psi, and solvent accessibility predictions
/home/casey/Downloads/sparks-x/bin/buildinp_query.sh t001_.fasta
running psiblast for sequence: t001_.fasta
At line 180 of file phipsi_ss0.f
Fortran runtime error: Bad real number in item 3 of list input
Aborting: Can't run first SS0 predictor
Error in file: t001_.fasta.phipsi