# Evolinc-I on OSG
Here are the instructions for running Evolinc-I on OSG (Open Science Grid)
- Login to Submit host
```
$ ssh <username>@login.osgconnect.net # username is your username
```
- Run OSG-Evolinc-I on the sample data
The sample data can be found in the `sample_data` folder in here
```
git clone https://github.com/Evolinc/OSG-Evolinc-I.git
cd OSG-Evolinc-I/sample_data_osg
```
In the `sample_data_osg` folder you will find input files and the following scripts for job submission to OSG
- Job description file
Here is an example of Job description file (`osg-evolinc-I-docker.submit`) for running Evolinc-I
```
# The UNIVERSE defines an execution environment. You will almost always use VANILLA.
Universe = vanilla
# These are good base requirements for your jobs on OSG. It is specific on OS and
# OS version, core cound and memory, and wants to use the software modules.
Requirements = HAS_SINGULARITY == True
request_cpus = 1
request_memory = 2 GB
request_disk = 4 GB
# Singularity settings
+SingularityImage = "docker://upendradevisetty/osg-evolinci:1.7.4"
+SingularityBindCVMFS = false
# EXECUTABLE is the program your job will run It's often useful
# to create a shell script to "wrap" your actual work.
Executable = osg-evolinc-I-wrapper.sh
Arguments =
# inputs/outputs
transfer_input_files = osg-evolinc-I.sh, Sample_cuffcompare_out.gtf, TAIR10_chr1.fasta, TAIR10_chr1_genes.gff
transfer_output_files = test_out
# ERROR and OUTPUT are the error and output channels from your job
# that HTCondor returns from the remote host.
Error = $(Cluster).$(Process).error
Output = $(Cluster).$(Process).output
# The LOG file is where HTCondor places information about your
# job's status, success, and resource consumption.
Log = $(Cluster).$(Process).log
# Send the job to Held state on failure.
on_exit_hold = (ExitBySignal == True) || (ExitCode != 0)
# Periodically retry the jobs every 1 hour, up to a maximum of 5 retries.
periodic_release = (NumJobStarts < 5) && ((CurrentTime - EnteredCurrentStatus) > 60*60)
# QUEUE is the "start button" - it launches any jobs that have been
# specified thus far.
Queue 1
```
- Executable script
Here is an example of executable script (osg-evolinc-I.sh)
```
#!/bin/bash
evolinc-part-I.sh -c Sample_cuffcompare_out.gtf -g TAIR10_chr1.fasta -r TAIR10_chr1_genes.gff -o test_out -n 1
```
- Wrapper script
Here is the wrapper script (osg-evolinc-I-wrapper.sh)
```
#!/bin/bash
bash osg-evolinc-I.sh > osg-evolinc-I.out
```
- Job submission
Submit the job using `condor_submit` command
```
$ condor_submit osg-evolinc-I-docker.submit
```
- Job status
Your first job is on the grid! The `condor_q` command tells the status of currently running jobs. Generally you will want to limit it to your own jobs by adding your own username to the command.
```
condor_q <username>
```
- Job output
Once your job has finished, you can look at the files that HTCondor has returned to the working directory. If everything was successful, it should have returned `test_out` which contains bam, gtf and other files.