Module-RNA_MERGE



DOC_ID : T15-0002

RNA_MERGE module : 

DOC_ID : M33-3000
Editor : Mira
Reviewer : Angela

Function :

Use java program to merge contents of all the files in a directory.
We are given a directory/folder in which n number of files are stored(We dont know the number of files) and we want to merge the contents of all the files into a single file lets say output.txt.

Following are the steps :

  1. Create instance of directory.
  2. Create a PrintWriter object for “output.txt”.
  3. Get list of all the files in form of String Array.
  4. Loop for reading the contents of all the files in the directory.
  5. Inside the loop for every file do
  6. Create instance of file from Name of the file stored in string Array.
  7. Create object of BufferedReader for reading from current file.
  8. Read from current file.
  9. Write to the output file.

Ref : https://www.geeksforgeeks.org/java-program-to-merge-contents-of-all-the-files-in-a-directory/

Installation :

All software are included in GA environment

Note :

►執行分析前請先利用CreateProject.sh創建一個專案資料夾,請參閱Project standard folder structure文件。

►執行模組需確認所屬計算節點(–partition) : 一般節點的使用者建議使用ct56 ; 生醫節點的使用者建議使用ngs24G註1

►欲了解模組使用的方式,請執行模組的 -h 指令
 

#註1 : 欲確認使用者身分,請登入國網中心iService後,選取會員中心/計畫管理/我的計畫,若計畫名稱為”國家生醫數位資料與分析運算雲端服務平台III”即為生醫節點使用者

Description :

Tested environmentGApp0.0.0.2
software versionapps/FileCombin.0.2.0.jar
Usage(Slurm)Command in Slurm (Taiwania III)
sbatch -A $projectID --mail-user=$email --export='projDir='$(pwd)'/,outName=Case1' modules/RNA_MERGE.sh
Usage(Linux console)Command in linux console
bash modules/RNA_MERGE.sh -p $(pwd) -o Case1
#For Slurm operation , please refer to “Basic operation of Taiwania III

Usage :

The following explains the usage of module parameters :

Parameter DescriptionRemark
RNA_MERGE.shModule of differentially expressed genes detecting分析的模組需存放在[modules]資料夾中
projDir分析專案的資料夾路徑(專案資料夾結構說明Script 需在分析專案的資料夾執行, $(pwd)會傳回使用者現在所在的路徑
outName輸出結果的檔案名稱 :資料格式 :  *.txt資料路徑 : report/例如: outName = Case1 會在 report/生成Case1_expected_count.txt
Case1_FPKM.txt
Case1_TPM.txt

Leave a comment