Closed vicbp1 closed 5 years ago
that's because the example is outdated (sorry), look at the options at the top. The option is not -f
but -B
find src/test/resources/ -name "S*.bam" > jeter.list
java -jar dist/fixvcfmissinggenotypes.jar -B jeter.list src/test/resources/rotavirus_rf.vcf.gz
Dear Pierre,
Thank you for the response. I have success with the example, but I have a problem with my data
following that comand and having my bam files with the same name as the samples of the vcf and the index bam with
Do you have any recomendation?
Thank you for your time
you have to index your bams with 'samtools index '
they are indexed and they are in the same path of the bam using samtools index sample_R1_fastq.bam
samtools index sample_R3_fastq.bam
and generating the sample_R1_fastq.bam.bai and sample_R3_fastq.bam
but I still have the same error.
use 'list_2bams.list' , not 'list_2bams.txt"
now it works!
Thank you so much for your time!
Dear Pierre I have a problem using fixvcfmissinggenotypes
I am using (just for a test) two exome vcf samples, merging with vcf-merge and indexing the file resulting in a vcf ver4.2 I have indexed the bam files (in the same directory) and them I tried to identify the missing values
my bam list is : /home/path/bam_files/V21_R1.fastq.bam /home/path/bam_files/V23_R1.fastq.bam
when I run java -jar ./dist/fixvcfmissinggenotypes.jar -f list_2bams_list.txt < twosamples_test.vcf.gz > 2samples_test_nonmissing.vcf
I received the following error:
mple_nonmissing.vcf [SEVERE][Launcher]Your input file has a malformed header: We never saw the required CHROM header line (starting with one #) for the input VCF file htsjdk.tribble.TribbleException$InvalidHeader: Your input file has a malformed header: We never saw the required CHROM header line (starting with one #) for the input VCF file at htsjdk.variant.vcf.VCFCodec.readActualHeader(VCFCodec.java:115) at htsjdk.variant.vcf.VCFIteratorBuilder$VCFReaderIterator.(VCFIteratorBuilder.java:177)
at htsjdk.variant.vcf.VCFIteratorBuilder.open(VCFIteratorBuilder.java:97)
at com.github.lindenb.jvarkit.util.vcf.VCFUtils.createVCFIteratorFromInputStream(VCFUtils.java:289)
at com.github.lindenb.jvarkit.util.vcf.VCFUtils.createVCFIterator(VCFUtils.java:327)
at com.github.lindenb.jvarkit.util.jcommander.Launcher.openVCFIterator(Launcher.java:514)
at com.github.lindenb.jvarkit.util.jcommander.Launcher.doVcfToVcf(Launcher.java:561)
at com.github.lindenb.jvarkit.util.jcommander.Launcher.doVcfToVcf(Launcher.java:583)
at com.github.lindenb.jvarkit.tools.misc.FixVcfMissingGenotypes.doWork(FixVcfMissingGenotypes.java:346)
at com.github.lindenb.jvarkit.util.jcommander.Launcher.instanceMain(Launcher.java:736)
at com.github.lindenb.jvarkit.util.jcommander.Launcher.instanceMainWithExit(Launcher.java:894)
at com.github.lindenb.jvarkit.tools.misc.FixVcfMissingGenotypes.main(FixVcfMissingGenotypes.java:358)
I tried to repeated the experiment with the examples of the program for rotavirus but the error is still the same.
Can you help me with that? Thank you for your time