bash - 得到 GATK 参数错误并且不明白?
问题描述
您好 bash 程序员,我正在使用 GATK 并尝试遍历我的 bam 文件并使用我的 target_intervals 和已知的 indel 进行本地重新对齐。下面是我正在尝试的代码。我希望有人可以帮助解决错误并更正我的代码。
# do the local realignment.
echo "local realignment..."
for file in `ls -d adp/map/*marked_duplicates.bam`
do
java -jar ~/software/GenomeAnalysisTK-3.3-0/GenomeAnalysisTK.jar \
-T IndelRealigner \
-R ~/flybase/fb-r5.57/dmel-all-chromosome-r5.57.fasta \
-I $file \
-known adp/map/*indel_intervals.vcf \
-targetIntervals adp/map/*target_intervals.list \
-o ${file}_realigned_reads.bam
done
wait
# Create a new index file.
echo "indexing the realigned bam file..."
for file in `ls -d adp/map/*realigned_reads.bam`
do
~/software/samtools-1.2/samtools index $file
done
错误:查找时,这似乎是一个编码问题,我没有看到它。
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A USER ERROR has occurred (version 3.3-0-g37228af):
##### ERROR
##### ERROR This means that one or more arguments or inputs in your command are incorrect.
##### ERROR The error message below tells you what is the problem.
##### ERROR
##### ERROR If the problem is an invalid argument, please check the online documentation guide
##### ERROR (or rerun your command with --help) to view allowable command-line arguments for this tool.
##### ERROR
##### ERROR Visit our website and forum for extensive documentation and answers to
##### ERROR commonly asked questions http://www.broadinstitute.org/gatk
##### ERROR
##### ERROR Please do NOT post this error to the GATK forum unless you have really tried to fix it yourself.
##### ERROR
##### ERROR MESSAGE: Invalid argument value 'adp/map/360M_F_L002.recal.bam.sorted.bam_marked_duplicates.bam_target_intervals.list' at position 10.
##### ERROR Invalid argument value 'adp/map/517_F_L002.recal.bam.sorted.bam_marked_duplicates.bam_target_intervals.list' at position 11.
##### ERROR Invalid argument value 'adp/map/517M_F_L002.recal.bam.sorted.bam_marked_duplicates.bam_target_intervals.list' at position 12.
##### ERROR Invalid argument value 'adp/map/900_F_L002.recal.bam.sorted.bam_marked_duplicates.bam_target_intervals.list' at position 13.
##### ERROR Invalid argument value 'adp/map/900M_F_L002.recal.bam.sorted.bam_marked_duplicates.bam_target_intervals.list' at position 14
.
解决方案
至少部分问题出*
在您的命令中。GATK 不能很好地处理 glob。要为参数指定多个值,请多次指定参数。
即代替
-known adp/map/*indel_intervals.vcf
您需要使用单独的参数指定每个文件
-known adp/map/first_file.indel_intervals.vcf
-known adp/map/second_file.indel_intervals.vcf
可能还有其他问题。例如,我不确定是否-targetIntervals
可以将多个文件作为输入。另外,这是非常旧的 gatk 版本,您可能需要升级到 3.8。
推荐阅读
- bash - Bash 脚本问题 - 函数。他们为什么不工作?
- laravel - How to OrderBy HasManyThrough Relation 特定列
- processing - P3D 草图在 Python 处理模式下不起作用
- r - 如何修剪r中的向量?
- java - 更改 ID 字符串后 Java 性能严重下降
- sql-server - SQL Server - 多个客户的同一张表
- android - Java,Android - 当设备设置为深色主题时,应用程序在首次启动应用程序时以深色模式打开
- r - 如何通过在 R 中重复其值来扩展向量以匹配另一个向量?
- javascript - 使用 webpack 响应延迟加载模块
- ruby-on-rails - 使用 react 和 json 将图像上传到 rails