请选择 进入手机版 | 继续访问电脑版

生信人

找回密码
立即注册
搜索
热搜: 活动 交友 discuz
发新帖

0

收听

12

听众

246

主题
发表于 2023-5-9 18:04:38 | 查看: 388| 回复: 0
       导入数据是 16S 测序数据分析中的第一步,也是最重要最难的一步。由于 16S 测序需要引物扩增,而且 16S 测序数量较小,一个样品几千条序列,对于高通量测序来说很小,因此都需要混合测序。将不同样品连接上 barcode 混合测序,测序完成之后在进行拆分。最终 16S测序的数据就有多个维度。
       1、fasta 和 fastq;
       2、单端测序与双端测序;
       3、单端 barcode 与双端 barcode;
       4、barcode 独立一个文件还是连接在序列中;
       5、barcode 序列在 ID 中;
       6、barcode 信息在 metadata 元数据中;
       因此,在导入数据之前,一定要对自己的数据有所了解,例如扩增 16S 哪个区域,单端测序还是双端测序,barcode 的位置等;如果是测序公司提供的数据,需要提供对应的 barcode信息。
       qiime2 支持多种不同的数据类型输入,但是需要指定具体的数据类型参数,通过—type 指定。
  1. https://docs.qiime2.org/2023.2/tutorials/importing/
复制代码
  1. #1 查看输入文件类型
  2. qiime tools import --show-importable-types
  3. #查看输入文件格式
  4. qiime tools import --show-importable-formats
复制代码
      fastq 格式是 16S 最常用的一种文件格式,目前 fastq 格式主要分为以下四种。
案例一:EMP 计划的 fastq 格式;
       emp 计划使用一套标准的流程,生成的数据特点是 barcode 序列于 16S 序列分别存储在不同的文件中,有点类似于单细胞测序,每一条序列对应唯一的 barcode 序列。将相同 barcode序列进行合并即可。

  1. #EMP单端测序下载
  2. mkdir emp-single-end-sequences
  3. wget -O "emp-single-end-sequences/barcodes.fastq.gz" "https://data.qiime2.org/2023.2/tutorials/moving-pictures/emp-single-end-sequences/barcodes.fastq.gz"
  4. wget -O "emp-single-end-sequences/sequences.fastq.gz" "https://data.qiime2.org/2023.2/tutorials/moving-pictures/emp-single-end-sequences/sequences.fastq.gz"
  5. #查看barcode
  6. cd emp-single-end-sequences
  7. zcat barcodes.fastq.gz |head
  8. #EMP单端测序导入
  9. qiime tools import \
  10.   --type EMPSingleEndSequences \
  11.   --input-path emp-single-end-sequences \
  12.   --output-path emp-single-end-sequences.qza

  13. #EMP双端测序下载
  14. mkdir emp-paired-end-sequences
  15. wget \
  16.   -O "emp-paired-end-sequences/forward.fastq.gz" \
  17.   "https://data.qiime2.org/2023.2/tutorials/atacama-soils/1p/forward.fastq.gz"
  18. wget \
  19.   -O "emp-paired-end-sequences/reverse.fastq.gz" \
  20.   "https://data.qiime2.org/2023.2/tutorials/atacama-soils/1p/reverse.fastq.gz"
  21. wget \
  22.   -O "emp-paired-end-sequences/barcodes.fastq.gz" \
  23.   "https://data.qiime2.org/2023.2/tutorials/atacama-soils/1p/barcodes.fastq.gz"
  24. #EMP双端测序导入
  25. qiime tools import \
  26.   --type EMPPairedEndSequences \
  27.   --input-path emp-paired-end-sequences \
  28.   --output-path emp-paired-end-sequences.qza
复制代码
案例二:barcode 序列在 fastq 序列中
       barcode 序列连接到测序数据上,可以在一端,也可以在两端。这种数据需要提供一个metadata 文件。

  1. mkdir muxed-se-barcode-in-seq
  2. wget \
  3.   -O "muxed-se-barcode-in-seq/sequences.fastq.gz" \
  4.   "https://data.qiime2.org/2023.2/tutorials/importing/muxed-se-barcode-in-seq.fastq.gz"
  5. #单端测序
  6. qiime tools import \
  7.   --type MultiplexedSingleEndBarcodeInSequence \
  8.   --input-path muxed-se-barcode-in-seq/sequences.fastq.gz \
  9.   --output-path multiplexed-seqs.qza

  10. #双端测序
  11. mkdir muxed-pe-barcode-in-seq
  12. wget \
  13.   -O "muxed-pe-barcode-in-seq/forward.fastq.gz" \
  14.   "https://data.qiime2.org/2023.2/tutorials/importing/muxed-pe-barcode-in-seq/forward.fastq.gz"
  15. wget \
  16.   -O "muxed-pe-barcode-in-seq/reverse.fastq.gz" \
  17.   "https://data.qiime2.org/2023.2/tutorials/importing/muxed-pe-barcode-in-seq/reverse.fastq.gz"

  18. qiime tools import \
  19.   --type MultiplexedPairedEndBarcodeInSequence \
  20.   --input-path muxed-pe-barcode-in-seq \
  21.   --output-path multiplexed-seqs.qza
复制代码
案例三:使用 illumina Casava 1.8 拆分的格式
       illumina Casava 1.8 拆分的 fastq 文件,会直接将样品名和 barcode 信息添加在文件名中。例如 L2S357_15_L001_R1_001.fastq.gz 文件名。

  1. 1 L2S357 为样品名
  2. 2 15 为 barcode 序列或者 barcode 标识符;
  3. 3 L001 为 the lane number,
  4. 4、R1 reads 标识符,R1 为 reads1,R2 为 reads2
  5. 5 001 为数据集名称
复制代码
      这种格式直接进行拆分即可
  1. #单端结果
  2. wget \
  3.   -O "casava-18-single-end-demultiplexed.zip" \
  4.   "https://data.qiime2.org/2023.2/tutorials/importing/casava-18-single-end-demultiplexed.zip"
  5. unzip -q casava-18-single-end-demultiplexed.zip
  6. qiime tools import \
  7.   --type 'SampleData[SequencesWithQuality]' \
  8.   --input-path casava-18-single-end-demultiplexed \
  9.   --input-format CasavaOneEightSingleLanePerSampleDirFmt \
  10.   --output-path demux-single-end.qza
  11. #双端结果
  12. wget \
  13.   -O "casava-18-paired-end-demultiplexed.zip" \
  14.   "https://data.qiime2.org/2023.2/tutorials/importing/casava-18-paired-end-demultiplexed.zip"
  15. unzip -q casava-18-paired-end-demultiplexed.zip
  16. qiime tools import \
  17.   --type 'SampleData[PairedEndSequencesWithQuality]' \
  18.   --input-path casava-18-paired-end-demultiplexed \
  19.   --input-format CasavaOneEightSingleLanePerSampleDirFmt \
  20.   --output-path demux-paired-end.qza
复制代码
案例四:manifest file
       如果每个样品是独立的文件,可以通过一个 manifest 文件进行导入。文件格式为样品 ID,reads1 和 reads2 的绝对路径。

  1. #phred编码方式33
  2. wget \
  3.   -O "se-33.zip" \
  4.   "https://data.qiime2.org/2023.2/tutorials/importing/se-33.zip"
  5. wget \
  6.   -O "se-33-manifest" \
  7.   "https://data.qiime2.org/2023.2/tutorials/importing/se-33-manifest"
  8. unzip -q se-33.zip
  9. qiime tools import \
  10.   --type 'SampleData[SequencesWithQuality]' \
  11.   --input-path se-33-manifest \
  12.   --output-path single-end-demux.qza \
  13.   --input-format SingleEndFastqManifestPhred33V2
  14. #phred编码方式64
  15. wget \
  16.   -O "pe-64.zip" \
  17.   "https://data.qiime2.org/2023.2/tutorials/importing/pe-64.zip"
  18. wget \
  19.   -O "pe-64-manifest" \
  20.   "https://data.qiime2.org/2023.2/tutorials/importing/pe-64-manifest"
  21. unzip -q pe-64.zip
  22. qiime tools import \
  23.   --type 'SampleData[PairedEndSequencesWithQuality]' \
  24.   --input-path pe-64-manifest \
  25.   --output-path paired-end-demux.qza \
  26.   --input-format PairedEndFastqManifestPhred64V2
复制代码
      还有其他格式导入见官网。

收藏回复 显示全部楼层 道具 举报

您需要登录后才可以回帖 登录 | 立即注册

QQ|Archiver|手机版|小黑屋|生信人

GMT+8, 2024-3-28 19:16 , Processed in 0.158557 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表