Skip to content

Commit

Permalink
Final ajustments to specific_files mode
Browse files Browse the repository at this point in the history
  • Loading branch information
netbofia committed Nov 15, 2017
1 parent 4e12b19 commit b1c6530
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
9 changes: 7 additions & 2 deletions docs/source/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ This is the simplest test case. Let's break down this command.
* --fasta test_dataset- - Run in fasta mode, and use all libraries that have the string "test_dataset-" preceding the sequential numbering.

.. Important:: MiRPursuit is designed to run an interval of libraries. So it will run all libraries starting with **test_dataset-1.fa** (-f first in this example 1), up to **test_dataset-1.fa** (-l last in this example 2). The files to be processed in your **INSERTS_DIR** should have a common string along with a sequential numbering.
However you can also use it in **specific file mode**. That is specify the file you want to process for a single run.


.. image:: https://raw.githubusercontent.com/forestbiotech-lab/sRNA-workflow/master/images/MiRPursuit-full-run.png
Expand Down Expand Up @@ -83,7 +84,7 @@ The full listing of the options available
Optional arguments
* **--lib** Set the library number that should be assigned to the specified file. (Only relevant if using specific files)
* **--fasta** Set the program to start using fasta files. As an argument supply the file name that identifies the series to be used. Ex: Lib_1.fa, Lib_2.fa, .. --> argument should be Lib_
* **--fasta** Set the program to start using fasta files. If no sequence of libraries are given then the argument can be a specific file.
* **--fasta** (In specific mode. i.e. no -f and -l) Set the program to start using fasta files. If no sequence of libraries are given then the argument can be a specific fasta file (uncompressed for now).
* **--fastq** Set the program to start using fastq files. As an argument supply the file name that identifies the series to be used. Ex: Lib_1.fq, Lib_2.fq, .. --> argument should be Lib_ , if no .fq file is present but instead a .fastq.gz file will additionally be extracted automatically.
* **--trim** Set this flag to perform adaptor triming. No argument should be given. The adaptor is in the workdirs.cfg config file in the variable ADAPTOR.
* **-s|--step** Step is an optional argument used to jump steps to start the analysis from a different point
Expand All @@ -93,7 +94,11 @@ The full listing of the options available
* Step 3: Tasi
* Step 4: Mircat
* Step 5: Reporting


Specific file mode
* **--fasta${NC}** (In specific mode. i.e. no -f and -l) Set the program to start using fasta files. If no sequence of libraries are given then the argument can be a specific fasta file (uncompressed for now).
* **--fasta${NC}** (In specific mode. i.e. no -f and -l) Set the program to start using fasta files. If no sequence of libraries are given then the argument can be a specific fasta file (uncompressed for now).
* **--lib${NC}** (Optional) (In specific mode. i.e. no -f and -l) Set the library number to be attributed to the file. Should be coupled with --fasta or --fastq.

Both fasta and fastq options work in the same manner they require the preceding string to the sequential numbering that all libraries have in common.
Ex:
Expand Down
12 changes: 8 additions & 4 deletions miRPursuit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,19 @@ case $key in
${blue}--lib${NC} lib is an optional argument used to specify the number to be attributed to the specified file.
${blue}--lc${NC} Set the program to begin in lcmode instead of fs mode. The preceding substring from the lib num. (Pattern) Template + Lib num, but identify only one file in the inserts_dir
${blue}--fasta${NC} Set the program to start using fasta files. As an argument supply the file name that identifies the series to be used. Ex: Lib_1.fa, Lib_2.fa, .. --> argument should be Lib_
${blue}--fasta${NC} Set the program to start using fasta files. Can also be used to run for specific file. If running with specific file as argument (I.E. no -f & -l flags)
${blue}--fastq${NC} Set the program to start using fastq files. As an argument supply the file name that identifies the series to be used. Ex: Lib_1.fq, Lib_2.fq, .. --> argument should be Lib_ , if no .fq file is present but instead a .fastq.gz file will additionally be extracted automatically.
${blue}--trim${NC} Set this flag to perform adaptor trimming. No argument should be given. The adaptor is in the workdirs.cfg config file in the variable ADAPTOR.
${blue}--headless${NC} Set this flag to run on headless server. Requires Xvfb be installed on your system. Along with libswt-gtk-3-java and gkt3.
sudo apt-get update
sudo apt-get install xvfb libswt-gtk-java gkt3
${blue}--no-prompt${NC} Set this flag to skip all prompts.
"
-------------------------
Specific file mode
-------------------------
${blue}--fasta${NC} (In specific mode. i.e. no -f and -l) Set the program to start using fasta files. If no sequence of libraries are given then the argument can be a specific fasta file (uncompressed for now).
${blue}--fasta${NC} (In specific mode. i.e. no -f and -l) Set the program to start using fasta files. If no sequence of libraries are given then the argument can be a specific fasta file (uncompressed for now).
${blue}--lib${NC} (Optional) (In specific mode. i.e. no -f and -l) Set the library number to be attributed to the file. Should be coupled with --fasta or --fastq.
"
exit 0
esac
shift # past argument or value
Expand Down Expand Up @@ -421,7 +425,7 @@ if [[ "$step" -eq 3 ]]; then
fi
if [[ "$step" -eq 4 ]]; then
#mircat
>&2 echo -ne "${blue}:::: Step 4${NC} - Running mircat (Be patient, slow step) [#################### ] 80%\r"
>&2 echo -ne "${blue}:::: Step 4${NC} - Running miRCat (Be patient, slow step) [#################### ] 80%\r"
printf "80\tmiRCat\t4" >$progress

${DIR}/pipe_mircat.sh $LIB_FIRST $LIB_LAST
Expand Down

0 comments on commit b1c6530

Please sign in to comment.