Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

似乎是 vcf2pca 在使用 Eigen 库处理矩阵时出现了断言失败,可能是是矩阵索引超出了有效范围。 #6

Open
chanity256 opened this issue Sep 7, 2024 · 1 comment

Comments

@chanity256
Copy link

vcf2pca: src/./include/Eigen/src/Core/DenseCoeffsBase.h:427: Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator()(Eigen::Index) [with Derived = Eigen::Matrix<int, -1, 1>; Eigen::DenseCoeffsBase<Derived, 1>::Scalar = int; Eigen::Index = long int]: Assertion `index >= 0 && index < size()' failed.
/var/spool/slurm/d/job16383335/slurm_script: line 8: 24083 Aborted (core dumped) vcf2pca -InVCF /public/agis/changyuxiao_group/wanghaonan/project/02_pepper/07_snp.vcf/merged_496pepper.snp.filtered.miss0.2maf0.05.vcf.recode.vcf -OutPut vcf2pca.pepper.miss0.2maf0.05

这是日志的输出内容。

这是我的代码:

1.合并所有的gvcf并进行joint callling

查找所有的 GVCF 文件

#gvcf_files=$(find $gvcfgz_dir -type f -name "*.gvcf.gz")

构建输入文件列表并执行 Sentieon 命令

#$SENTIEON_INSTALL_DIR/bin/sentieon driver -t $nt -r $reference
#--algo GVCFtyper
#$(for file in $gvcf_files; do echo -n "-v $file "; done)
#$output_vcf/${name_merged}.vcf

2.对合并的vcf文件SelectVariants-提取 SNPs

#gatk --java-options "-Xmx50g" SelectVariants -R $reference -select-type-to-include SNP -V $output_vcf/${name_merged}.vcf -O $output_vcf/${name_merged}.snp.vcf

3.VariantFiltration SNP 硬过滤,并去除低质量的 SNP(也就是有SNP_Filter标记的行)

#gatk --java-options "-Xmx50g" VariantFiltration -V $output_vcf/${name_merged}.snp.vcf --filter-expression 'QD < 2.0 || MQ < 40.0 || FS > 60.0 || SOR > 3.0 || MQRankSum < -12.5 || ReadPosRankSum < -8.0' --filter-name 'SNP_Filter' -O $output_vcf/${name_merged}.snp.filtering.vcf

#less $output_vcf/${name_merged}.snp.filtering.vcf | grep -v "SNP_Filter" > $output_vcf/${name_merged}.snp.filtered.vcf

4.vcftools再过滤

vcftools --vcf $output_vcf/${name_merged}.snp.filtered.vcf --max-missing 0.2 --maf 0.05 --recode --recode-INFO-all --out $output_vcf/${name_merged}.snp.filtered.REmiss0.2maf0.05.vcf

@hewm2008
Copy link
Owner

不知能解决了吗? 这个有可能是某一两个样品的miss太严重,建议比对率小于40%的样品可以考虑先去掉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants