My objective is to take a g.vcf.gz file and from 25-30 unmapped contigs with titles like "NW_020192317.1", I want to make a subset of ~10k variants from each of the unmapped contigs and make one final g.vcf file that includes the header from the original g.vcf.gz file.
From the post here, I have tried running:
samtools view -bo output.g.vcf -s 123.4 inputfile.g.vcf.gz NW_020192317.1
and I keep receiving the output:
Aborted (core dumped)
I'm not too picky about the number of variants per contig, as long as it is in the thousands, that's why I tried using ".4"
Alternatively, I tried using the code:
samtools view input.g.vcf.gz "NW_020192317.1:1-2" > output.g.vcf
and I recieved the same response of "Aborted (core dumped)" with nothing else. I am confused what is wrong here and why it is throwing an error.