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 :
- Create instance of directory.
- Create a PrintWriter object for “output.txt”.
- Get list of all the files in form of String Array.
- Loop for reading the contents of all the files in the directory.
- Inside the loop for every file do
- Create instance of file from Name of the file stored in string Array.
- Create object of BufferedReader for reading from current file.
- Read from current file.
- 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 environment | GApp0.0.0.2 |
software version | apps/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 consolebash 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 | Description | Remark |
RNA_MERGE.sh | Module 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 |