As i need a program to performence the localblast from reengineering a computer model for our scientific research, so i wrote a vb.net program. when the program run into the line of start a process object to call a external command on the linux platform, the program throw me an exception:
xieguigang@xieguigang-HP-Compaq-8510w:~/Desktop/Debug$ mono ./c2.exe build -i "/home/xieguigang/Desktop/8004.gbk" -f gbk
[c2.exe, version 1.0.0.0] c2 compiler
Variable 'blastbin' = "/home/xieguigang/blast/bin/"
Variable 'blastdb' = "/home/xieguigang/blast/db/"
Export all CDS sequence from the GenBank file:
"/home/xieguigang/Desktop/8004.gbk"
Missing method .ctor in assembly /home/xieguigang/Desktop/Debug/Bio.Assembly.dll, type System.Runtime.CompilerServices.ExtensionAttribute
Can't find custom attr constructor image: /home/xieguigang/Desktop/Debug/Bio.Assembly.dll mtoken: 0x0a00003c
Data was export to file:
"/home/xieguigang/blast/db//8004.fsa"
Sequence type is proteins...
Call external command to format the target fasta database:
"/home/xieguigang/blast/bin//formatdb -i "/home/xieguigang/blast/db//8004.fsa" -p T"
xdg-open: unexpected option '-i'
Try 'xdg-open --help' for more information.
Job done!
actually the logs out put are comes from the code that shown below, its clearly that the exception is comes from the line of process.start() calling:
Public Shared Sub FormatGBK(GBK As String, Optional Saved As String = "", Optional FileType As FASTATypes = FASTATypes.Protein)
Dim Process As System.Diagnostics.Process = New System.Diagnostics.Process()
If FileType = FASTATypes.Protein Then
Printfn("Export all CDS sequence from the GenBank file:\n \'%s\'", GBK)
Dim FASTA As String = ExportAllCDS(GBK, Saved)
Printfn("Data was export to file:\n \'%s\'", FASTA)
Printfn("Sequence type is proteins...")
Process.StartInfo = Global.c2.LocalBLAST.CommandLines.FormatDb(FASTA, FileType)
Printfn("Call external command to format the target fasta database:\n \'%s\'", String.Format("{0} {1}", Process.StartInfo.FileName, Process.StartInfo.Arguments))
Process.StartInfo.UseShellExecute = True
Process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
Call Process.Start()
Call Process.WaitForExit()
Printfn("Job done!")
ElseIf FileType = FASTATypes.Nucleotide Then
the System.Diagnostics.Process object in the statement is not working.....
I know the xdg-open is an application on the linux platform which have the same function as the object ' System.Diagnostics.Process' in vb.net
so how to deal with this situation on the linux platform when i using the vb.net program to call an external command?