knausb / vcfR

Tools to work with variant call format files
248 stars 54 forks source link

create.chrom() produces an empty object #135

Closed jrhb closed 5 years ago

jrhb commented 5 years ago

Hello,

i am using vcfR for the first time and using create.chromR() results in an (nearly) empty object (one locus/chromosome). I could not find any information regarding this error. I'd be grateful if someone can point me in the right direction to solve this.

my_vcf

Object of Class vcfR 71 samples 6945 CHROMs 12,956 variants Object size: 12.4 Mb 0 percent missing data


Following the documentation and other examples, the function:

chrom <- create.chromR( vcf=my_vcf)

results in:

Class chromR, method Show Name: CHROM Chromosome length: 80 bp Chromosome labels: None Annotation (@ann) count: 0 Annotation chromosome names: None Variant (@vcf) count: 2 Variant (@vcf) chromosome names: locus_13 Object size: 0 Mb Use head(object) for more details. End Show (chromR)

R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.2 LTS

knausb commented 5 years ago

Hi @jrhb ,

I'm afraid I do not understand what your goal is here. You report only having one chromosome but the output you've provided indicates that you have 6,945 chromosomes. This appears to be an inconsistency. I've put some suggestions on how to create a minimal reproducible example at the below link.

https://knausb.github.io/vcfR_documentation/reporting_issue.html

Good luck! Brian

jrhb commented 5 years ago

Hello Brian,

thank you for the quick reply. as recommended, here goes the R markdown and compiled html with the issue. Just to clarify, the issue is not in the vcf file, it's just when using create.chrom, visible in the plot() since it creates empty plots. I see now that the GT formats of my dataset and the library's vcf file are slightly different (“GT:DP:CATG” versus “GT:GQ:DP:HQ” and “GT:GQ:DP”), can that be the reason for the chrom plots resulting in no data about depth despite the DP information for instance? Kind regards, Joaorhb

On Fri, 24 May 2019 at 00:02, Brian Knaus notifications@github.com wrote:

Hi @jrhb https://github.com/jrhb ,

I'm afraid I do not understand what your goal is here. You report only having one chromosome but the output you've provided indicates that you have 6,945 chromosomes. This appears to be an inconsistency. I've put some suggestions on how to create a minimal reproducible example at the below link.

https://knausb.github.io/vcfR_documentation/reporting_issue.html

Good luck! Brian

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/knausb/vcfR/issues/135?email_source=notifications&email_token=AME2LCACK4W6W3T2C3O4RKDPW4IBDA5CNFSM4HPJBIX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWDTSYA#issuecomment-495401312, or mute the thread https://github.com/notifications/unsubscribe-auth/AME2LCAH4R6FQYUD4PVIJB3PW4IBDANCNFSM4HPJBIXQ .

knausb commented 5 years ago

Hi @jrhb, I see no reproducible example (Rmarkdown, html, R, etc.), so there is little I can do except speculate. You claim there is nothing wrong with your VCF data, but the output indicates that it is not what you have reported. This suggests you have issues. Also, I have no idea what your "library" is so I can't comment on that. Please try to create a reproducible example. Without it, I won't be able to help you.