Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in names vector length using primersearch_raw #326

Closed
rogmei opened this issue Nov 4, 2021 · 3 comments
Closed

Error in names vector length using primersearch_raw #326

rogmei opened this issue Nov 4, 2021 · 3 comments

Comments

@rogmei
Copy link

rogmei commented Nov 4, 2021

Hi, in my script I am looping through a bunch of files using primersearch_raw. Some files contain one fasta file others contain multiple fasta files. For some files primersearch_raw return 0 results without errors, for other files amplicons are returned, but for some files I get the error produced below and the script stops. My Embossversion is 6.5.0.0. Appreciate any help to resolve this issue.

fastafilepath
[1] "path to file\71168_Geotria_australis.fasta"
forward_primer
[1] "GGATTAGATACCCYACTATGC"
reverse_primer
[1] "GATTGCGCTGTTATCCCTAG"
mismatch_pr
[1] 10
primersearch_raw(file = fastafilepath, forward = forward_primer, reverse = reverse_primer, mismatch = mismatch_pr)

Results in:
Error in names(x) <- value :
'names' attribute [10] must be the same length as the vector [2

traceback()
4: colnames<-(*tmp*, value = c("pair_name", "amplimer", "input",
"name", "f_primer", "f_start", "f_mismatch", "r_primer",
"r_start", "r_mismatch"))
3: parse_primersearch(output_path)
2: dplyr::as_tibble(parse_primersearch(output_path))
1: primersearch_raw(file = fastafilepath, forward = forward_primer,
reverse = reverse_primer, mismatch = mismatch_pr)

Note that the fileextension had to be changed from fasta to txt to allow upload. Fastafile downloaded from genbank using entrez_fetch from the rentrez package.
71168_Geotria_australis.txt
]

@zachary-foster
Copy link
Contributor

Thanks for including code and data! I will try to take a look at it soon

@zachary-foster
Copy link
Contributor

I think I fixed it. Try installing the development version and see if it works now. Thanks!

install.packages("devtools")
devtools::install_github("grunwaldlab/metacoder")

@rogmei
Copy link
Author

rogmei commented Nov 8, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants