statgen / demuxlet

Genetic multiplexing of barcoded single cell RNA-seq
Apache License 2.0
117 stars 25 forks source link

VCF file throws "Not a VCF/BCF file" error #48

Closed kmuench closed 5 years ago

kmuench commented 5 years ago

Hello,

I am trying to figure out why running demuxlet with my vcf file, "sorted_kit1_1inFrontv3.vcf", is throwing this error.

After merging several vcf files together, I sorted the vcf files with vcftools (command: vcf-sort) and edited the header to reflect the numbering of the chromosomes, as per earlier suggestions. However, when I try to use demuxlet, I get this error:

Options for input SAM/BAM/CRAM : --sam [/data/H1_possorted_genome_bam.bam],
                                   --tag-group [CB], --tag-UMI [UB]
       Options for input VCF/BCF : --vcf [/data/sorted_kit1_1inFrontv3.vcf],
                                   --field [GT], --geno-error [0.01],
                                   --min-mac [1], --min-callrate [0.50], --sm,
                                   --sm-list
                  Output Options : --out [/data/16p_demuxlet_H1], --alpha,
                                   --write-pair, --doublet-prior [0.50],
                                   --sam-verbose [1000000],
                                   --vcf-verbose [10000]
          Read filtering Options : --cap-BQ [40], --min-BQ [13],
                                   --min-MQ [20], --min-TD,
                                   --excl-flag [3844]
  Cell/droplet filtering options : --group-list, --min-total, --min-uniq,
                                   --min-snp

Run with --help for more detailed help messages of each argument.

FATAL ERROR -
[bcf_chunked_reader.cpp:162 bool BCFChunkedReader::open_current_file()] Not a VCF/BCF file: /data/sorted_kit1_1inFrontv3.vcf

terminate called after throwing an instance of 'pException'
 what():  Exception was thrown

Does anyone know what might be causing this? Thank you.

kmuench commented 5 years ago

For reference, I'm attaching the output of head -n 100 sorted_kit1_1inFrontv3.vcf. first100LinesVCF.txt

hyunminkang commented 5 years ago

Can you check with bcftools? It seems that the first line is blank (which is not okay)?

Hyun.

Hyun Min Kang, Ph.D. Associate Professor of Biostatistics University of Michigan, Ann Arbor Email : hmkang@umich.edu

On Wed, Jun 19, 2019 at 2:50 AM kmuench notifications@github.com wrote:

For reference, I'm attaching the output of head -n 100 sorted_kit1_1inFrontv3.vcf. first100LinesVCF.txt https://github.com/statgen/demuxlet/files/3302782/first100LinesVCF.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/statgen/demuxlet/issues/48?email_source=notifications&email_token=ABPY5OP4KMI5JDFNG6E2MTDP3EN55A5CNFSM4HZCM5KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX7N2YQ#issuecomment-503242082, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPY5ONYSB5ODGEU732IB4LP3EN55ANCNFSM4HZCM5KA .

kmuench commented 5 years ago

Hello,

Huh, you are correct, thank you for catching that - once I removed the spaces at the beginning (through emacs), the files began to run. I'm a little unsure at what point those newlines were getting introduced - interestingly they would get re-introduced every time I opened the file with emacs, but as long as I deleted them before saving the file, the resulting saved file would not have those empty lines.

Thank you for your help!