Hi everyone.

I want to simplify the names of the samples of a VCF file by removing the suffix that was added during sequenciation but i am not being successful. Right now my samples are named like this:

    123_4:A7TT6AKXX:1:1000000001 or ABC100:A7TT6AKXX:1:1000000001 

In the first case I want to keep only the number before the underscore and in the second everything before the first colon (:). How can I do it? 

Here's how the header is organized in my vcf file:

    #CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  102_3:C6RL4ANXX:1:250529518     206E:C6RL4ANXX:2:250529583      AN07:C6RL4ANXX:2:250529585     B103:C6RL4ANXX:2:250529647      CA:C6RL4A

Thanks in advance.

bcftools **reheader**  https://samtools.github.io/bcftools/bcftools.html

> -s, --samples FILE
>
> new sample names, one name per line, in the same order as they appear in the VCF file. Alternatively, only samples which need to be renamed can be listed as "old_name new_name\n" pairs separated by whitespaces, each on a separate line. If a sample name contains spaces, the spaces can be escaped using the backslash character, for example "Not\ a\ good\ sample\ name". 