When converting vcf to plink format, the command is as follows:
plink --vcf snp.vcf --recode --allow-extra-chr --out test
An error occurred:
Error: Multiple instances of '_' in sample ID. If you do not want '_' to be treated as a FID/IID delimiter, use --double-id or --const-fid to choose a different method of converting VCF sample IDs to PLINK IDs, or --id-delim to change the FID/IID delimiter.
There is a hint in the error message.
By default, plink uses underscores to separate the sample names. The two separated fields are used as the family id and sample id in the ped file. If the sample name in the vcf contains multiple underscores, it cannot be divided correctly, the software will report an error.
Method 1: Modify the sample name
Assuming that the sample name of your vcf file is on line 7:
sed -i '7s/_/-/g' snp.vcf
Method 2: Modify –id-delim
The –id-delim parameter sets the default delimiter to be an underscore, which can be set to other characters to achieve the purpose of correct distinction.
Method 3: Add –double_id or –const-fid parameter
There are two kinds of parameters to specify the setting method of family_id by adding parameters.
The first type-double_id, keep the family id and sample id the same. For plant genome analysis, parents are often ignored, just add this parameter:
plink --vcf snp.vcf --recode --allow-extra-chr --double_id --out test
The second type – const-fid sets the family id to a constant (the default value is 0).
- Tidb2.1 reports Error statement count 5001 exceeded the transaction limit, autocommit = false
- React Hook “useState“ is called in function “xxx“ which is neither a React function component or
- Error: array bound is not an integer constant before ‘]’ token
- [Fixed]ERROR: canceling statement due to conflict with recovery
- How to Fix error: conversion from “” to non-scalar type “”
- Error in Tensorflow using variables: List of Tensors when single Tensor expected
- K8S error validating data: ValidationError(Deployment.spec): missing required field selector
- TypeException: Error setting non null for parameter #1 with JdbcType null
- Setting label malloc in MAC development_ error_ Break breakpoint (Xcode)
- No match for ‘operator =’ both ends of the equal sign do not match
- DataTables warning encountered using DataTables: table id = DataTables_Table_0 – Ajax error. For more information ab
- Keil’s duplicate definition problem: Error: L6200E: Symbol F6x8 multiply defined
- Quartus Error: Quartus_FPGA/Waveform.vwf specified with –testbench_vector_input_file option does not exist
- TensorFlow issue: Expected int32, got list containing Tensors of type ‘_Message’ instead.
- Vue: How to Solve Error uncaught (in promise) cancel
- How to Solve mount error(6): No such device or address
- Axios request failed, get the status code and error information, how to encapsulate the function dealing with the public error code
- error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory
- [Solved] javax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidDataSourceStat