当前位置:网站首页>2021-10-29 [microbiology] qiime2 sample pretreatment form automation script
2021-10-29 [microbiology] qiime2 sample pretreatment form automation script
2022-06-30 07:37:00 【Muyiqing】
Abstract
Some time ago, I studied 16S/ITS Analysis of , Yes qiime2 Have a certain understanding of the analysis process of , There is already a process for analysis , It will be sorted out and released later . Before analysis , The software needs to provide preprocessing files , Include a sample data sheet ( Two terminal sequencing data format ), A sample grouping table . Both of these were generated manually before , There is no way to group tables , The grouping of each project is different , But the sample data table can be automatically generated . Record here .
Tools and methods
Using language :bash
Use command
The first part is to extract the original data from the project data obtained by the supplier . Put it in 01.data Medium standby
for i in */00.RawData/*/*.raw_1.fq.gz;
do
i=${i%.raw_1.fq.gz};
mv {
${i}.raw_1.fq.gz,${i}.raw_2.fq.gz} ./;
done
Next, you need to obtain the complete sample data path through the sample name , And print qiime2 Table format required .
echo -e "id\tforward-absolute-filepath\treverse-absolute-filepath" >> all_sample.txt;
for i in *.raw_1.fq.gz;
do
i=${i%.raw_1.fq.gz};
echo -e "${i}\t`pwd`/${i}.raw_1.fq.gz\t`pwd`/${i}.raw_2.fq.gz" >> all_sample.txt;
done
Command Introduction
echo -e “” : Identify and print the separator inside the double quotation marks , This ensures that the output format is correct ;pwd : stay echo Execute the path acquisition command in , Absolute path of supplementary samples ;
">> " : Overwrite input into document , If it is a single greater than sign, enter , Previous documents will be cleared , There is only the last line in the final document .
Result display

summary
In fact, it is not difficult to manually operate the document , use excel Can also do . But considering that qiime2 Absolute path required , There is some trouble with every modification , Therefore, this part is optimized . If you have better suggestions , Welcome to discuss , Or add me VX:bbplayer2021 Invite in .
边栏推荐
- 期末复习-PHP学习笔记2-PHP语言基础
- 动态内存管理
- Halcon: read the camera and binary it
- 视频播放器(二):视频解码
- 2022 retail industry strategy: three strategies for consumer goods gold digging (in depth)
- Minecraft 1.16.5模组开发(五十) 书籍词典 (Guide Book)
- Implementation of binary search in C language
- Proteus catalog component names and Chinese English cross reference table
- 2021 private equity fund market report (62 pages)
- Basic knowledge of compiling learning records
猜你喜欢

Graphic explanation pads update PCB design basic operation

期末複習-PHP學習筆記3-PHP流程控制語句

Commands and permissions for directories and files

342 maps covering exquisite knowledge, one of which is classic and pasted on the wall

24C02

Binary tree related operations (based on recursion, implemented in C language)

線程池——C語言

halcon:读取摄像头并二值化

Three software installation methods

期末複習-PHP學習筆記6-字符串處理
随机推荐
How to batch modify packaging for DXP schematic diagram
记录开发过程中无法使用管理员身份修改系统文件问题
Final review -php learning notes 3-php process control statement
STM32 infrared communication 2
Socket socket programming -- UDP
期末複習-PHP學習筆記6-字符串處理
How to quickly delete routing in Ad
期末复习-PHP学习笔记3-PHP流程控制语句
Test enumeration types with STM32 platform running RT thread
Cadence innovus physical implementation series (I) Lab 1 preliminary innovus
RT thread kernel application development message queue experiment
Processes, jobs, and services
Network security - detailed explanation of VLAN and tunk methods
Basic knowledge points
Disk space, logical volume
Lt268 the most convenient TFT-LCD serial port screen chip in the whole network
Final review -php learning notes 6- string processing
Graphic explanation pads update PCB design basic operation
期末复习-PHP学习笔记11-PHP-PDO数据库抽象层.
动态内存管理