This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Converting GATK-style interval (1-based) to BED format

I am using a tool (FGTPartitioner) to conduct a 4 gamete test to partition regions passing the filter, but it outputs regions in GATK-style intervals which are 1-based as follows: <chr>:<start>-<end>

From original file:

Scaffold_12628_Chr2:1-362964
Scaffold_12628_Chr2:362965-362996
Scaffold_12628_Chr2:362997-363033

I want to use bcftools to filter the VCF based on these regions but it won't accept this input, so I tried to convert them to BED format using the following command:

regions.out | sed 's/:\|-/\t/gi' | awk '{print $1"\t"$2-1"\t"$3}'

And it gives me the following output:

Scaffold_12628_Chr2 0   362964
Scaffold_12628_Chr2 362964  362996
Scaffold_12628_Chr2 362996  363033

My question is does this reflect the actual coordinates that will exclude the potential recombination breakpoint? Because the end column of the first region and the start of the second are the same base number, and if I include the recombining region obviously the test would be pointless. Which coordinates would be appropriate for this?

Thanks, Miles

bed recombination gamete four coordinates vcf

0 answers

No answers yet.

Log in to answer this question.