Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8587153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:30:05+00:00 2026-06-11T22:30:05+00:00

I’ve installed mono on my ubuntu box and I’m trying to start a processes

  • 0

I’ve installed mono on my ubuntu box and I’m trying to start a processes which starts several other children processes using C# but the program has very strict requirements and isn’t starting correctly because of a environmental variable issues. When I call the program using backticks in perl it works fine. Can someone tell me how to emulate the backtick function in 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();

This is the error it generates when run under C# it runs fine in perl.

/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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:30:07+00:00Added an answer on June 11, 2026 at 10:30 pm

    The problem here, I think, is that the process created by System.Diagnostics has a default EnvironmentVariables of null. In looking at the definition for System.Diagnostics.ProcessStartInfo() here:

    http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.aspx

    EnvironmentVariables property is described thusly:

    Gets search paths for files, directories for temporary files,
    application-specific options, and other similar information.

    And, looking further, the EnvironmentVariables documentation is here:

    http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.environmentvariables.aspx

    With the excerpt:

    A string dictionary that provides environment variables that apply to
    this process and child processes. The default is null.

    So the “bash” shell you are spawning has no environment variables at all. If you are expecting certain things to be on the PATH or visible to your shell, you will need to make sure they are set. Alternately, you could use absolute paths for everything.

    From the example the following code adds a TempPath environment variable:

    myProcess.StartInfo.EnvironmentVariables.Add("TempPath", "/tmp")
    myProcess.StartInfo.UseShellExecute = false; 
    

    You must set the UseShellExecute property to false to start the process after changing the EnvironmentVariables property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to select an H1 element which is the second-child in its group
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Specifically, suppose I start with the string string =hello \'i am \' me And
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.