2

I'm trying to run a few scripts (whether python, java, etc). The developers in their documentation give code for me to put in. Here are some examples:

java -Xmx2g -jar muTect-XXXX-XX-XX.jar
--analysis_type MuTect
--reference_sequence <reference>
--cosmic <cosmic.vcf>
--dbsnp <dbsnp.vcf>
--intervals <intervals_to_process>
--input_file:normal <normal.bam>
--input_file:tumor <tumor.bam>
--out <call_stats.out>
--coverage_file <coverage.wig.txt> 

or

$ sudo easy_install virtualenv

Here's what I've done so far: 1) In windows 7, I've installed Cygwin; 2) I've installed Ubuntu for any Linux based computing.

My problem: I've tried putting these into cygwin, changing all the references to my file paths and the like. However, I can't seem to get anything to work. I assume I'm doing something very basic wrong. Does anyone have any insight or a VERY BASIC tutorial on how to get started? I'm not even sure what search terms to use in Google to find this kind of thing.

Thanks for any help.

2
  • Asking for tutorial or learning material recommendations is off-topic. I've mentioned below how you can run your Java program.
    – Karan
    May 26, 2015 at 20:09
  • Could you elaborate on "can't seem to get anything to work"? Which specific problems/errors do you encounter? On a sidenote: While cygwin is excellent for unix-like behavior in some aspects, it is not a replacement, and as such can not fully provide some linux-fundamentals that some programs rely on.
    – Jarmund
    May 26, 2015 at 20:48

2 Answers 2

1

You need to install the Java Runtime Environment (JRE) to run JARs (which are compiled programs, not scripts).

The JAR can then be launched via the normal cmd command prompt (no Cygwin required) or even by double-clicking in Windows Explorer. Since you want to pass arguments to it you should run it from the command prompt.

2
  • Thanks, Karan. I installed JRE, and am getting errors. I'm working with the developers on why that is. I get the same errors from the command prompt, the terminal in Ubuntu, and through Windows...so I guess that means I'm on the right track. May 26, 2015 at 21:24
  • If you specify the errors someone here can probably help, although if it's related to the specific program then the developers are the best people to contact. Good luck!
    – Karan
    May 26, 2015 at 21:28
1

Not all UNIX-like commands will work under Windows even with Cygwin installed so this may be the source of part of your confusion.

You haven't mentioned whether you have installed Java Runtime (as Karen points out) nor whether you have installed Python. Doing all that under Windows/Cygwin is really complicating things. I'd stick to your Ubuntu box for now till you get a better grasp of things. Linux (e.g. Ubuntu) is rather more command-line friendly than Windows until you get the hang of things.

For Java applications, you probably don't need Cygwin anyway as Java is pretty good at being cross-platform. So try running that command from a Windows command prompt. Just be aware that you have written it over several lines, if you want to put it directly into the command prompt, it must be on 1 line with spaces replacing the newlines. Also, the command references a number of resource and code files that will all need to be in the folder from which you are issuing the command unless you add folder prefixes to them.

My strong recommendation to you is to start with Ubuntu and Python. Python is an excellent language for learning about computers and programming and there are hundreds of really good tutorials just a Google away. Using those, you will quickly move from running basic interactive Python code to loading code from a file, learning about folders as you go. When you have that sorted, the rest will start to fall into place.

Moving on to Java and Python virtual environments is a little more advanced.

1
  • I've done as Karan and you mentioned, installed JRE and Python. I went over to Ubuntu and tried working from there. I am getting errors from the java program, but am getting the same errors from command line, terminal in Ubuntu, and through Windows. I assume this means I'm at least entering the commands in the right place. (I'm working with the developer on why I get errors) If I didn't need to pick this up quickly for my job, I'd work much more slowly. I am working quickly to get the basics of Python. Thanks for the help! I appreciate it. May 26, 2015 at 21:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .