I am trying to convert a vcf file to a OneMap file so I can use it in BatchMap (a fork of onemap). Everytime I use the onemap_read_vcfR function I get the following:
Source repository for OneMap (version 3.0.0), and BatchMap (version 1.0.3.0)
My command:
vcf_tfmpop <- onemap_read_vcfR(vcf = system.file("/project/argus/R_analyses/datasets/tfmappopminDP2.vcf.gz", package = "onemap"),
parent1 = "verdant",
parent2 = "oklahoma",
cross = "outcross")
Console output:
> vcf_tfmpop <- onemap_read_vcfR(vcf = system.file("/project/argus/R_analyses/datasets/tfmappopminDP2.vcf.gz", package = "onemap"),
+ parent1 = "verdant",
+ parent2 = "oklahoma",
+ cross = "outcross")
1:
I thought I may have an issue with my vcf file so I checked to see if vcfr could import it into R, which it could.
Command:
tfmappopVCF <- read.vcfR("/project/argus/R_analyses/datasets/tfmappopminDP2.vcf.gz")
Console output:
Scanning file to determine attributes.
File attributes:
meta lines: 114
header_line: 115
variant count: 1315014
column count: 282
Meta line 114 read in.
All meta lines processed.
gt matrix initialized.
Character matrix gt created.
Character matrix gt rows: 1315014
Character matrix gt cols: 282
skip: 0
nrows: 1315014
row_num: 0
Processed variant: 1315014
All variants processed
Anybody have any solutions?
Edit: Removed images and added everything as code instead.
Hi, First, please don't post images of your console, post copy-pasted text and format as code instead.
Second, please provide the exact source repository and revision/tag of the package you have been using. If you are using a fork of some other repo, this fork may be at fault. I don't know these packages. However the
1:
in the last line betrays that the function is attempting to read from the standard input, likescan()
orread.table(file=stdin())
, would thereby possibly ignoring the vcf parameter. I propose to inspect the source code of that function (typeonemap_read_vcfR
in the R console), it may have been altered in that fork. If so, post an issue in the issue tracker of that fork or contact the maintainer. Or use a stable version/tag that is working.As a side note, people always fork and experiment with other repos. To expect that the main branch of any repo is working properly at any given moment is very optimistic.
Thanks for the reply and feedback. I am pretty new to the scene so I don't always know the community norms. I edited the original post so Its formatted correctly, and added the source repositories. I couldn't figure out how to format the console output without making it look odd when I first posted.
I am not using the BatchMap fork at the moment. My plan was to use the OneMap package to convert the VCF to a OneMap file before using it in the BatchMap fork. And I get the following error when I try to do so:
Which is odd because it definately is a vcf file according vcfR
I reported the issue yesterday to the creator of the OneMap package.
OneMap used the vcfR package internally. Try the following: quit your R session and start R with --vanilla then update to the latest version of the vcfR package and try the following:
With vcf the path to your vcf file.
If that works, it should also work with the OneMap package, otherwise that would be odd because this is the exact code OneMap is using. Run the pipeline in a vanilla R session (R—-vanilla); don't use R-studio or the Docker environment (you can try that if this approach fails). I suspect a version mashup.
If that still does not work, please provide the output of sessionInfo and the VCF header of your file.