nvelden / geneviewer

An R package designed for drawing gene arrow maps
https://nvelden.github.io/geneviewer/
Other
26 stars 4 forks source link

Blastp error #6

Closed Johnny254 closed 4 months ago

Johnny254 commented 4 months ago

Hi,

I am experiencing an error with blastp.

I get this error after trying to blastp in R geneviewer using data in a dataframe imported from multiple gbk files (n=3).

Error: 'subject' is not an exported object from 'namespace:Biostrings' In addition: Warning message: In .call_fun_in_pwalign("pairwiseAlignment", ...) 👍🏾 pairwiseAlignment() has moved to the pwalign package. Please call pwalign::pairwiseAlignment() to get rid of this warning.

The code for blastp is as shown below.

folder_path <- "/home/XXX/Documents/GeneViewer_R_08.05.2024/GIs/Test/gbk_files_version2" data_updated <- protein_blast( folder_path, id = "protein_id", query = "Abaumannii_AbGRI2-9", identity = 30 )

Please advice.

_Other queries. Does it need to make its own makeblastdb for the subject for it to compare the two protein seqs?

I have also tried to manually enter the blastp comparison data into a df but got stuck in making the gc_links for the columns "BlastP" and "gene". The chart was successfully generated though. How does the df for the "Blast_resultsfunctions" look like in color by gene function after running blastp?

Thank you.

clusters_df_all.csv

nvelden commented 4 months ago

Starting with Bioconductor 3.19, the pairwiseAlignment function and associated functionalities have been relocated from the Biostrings package to a new, dedicated package called pwalign. I have updated the protein_blast function to dynamically select the appropriate package based on the version of Bioconductor being used. Please try the latest version of the package on GitHub to see if it resolves your issue. Your feedback on this update would be greatly appreciated!

Johnny254 commented 4 months ago

Hi

Unfortunately, the errors are still coming up in BlastP runs after reinstalling the package using the Github current package version.

Error in checkForRemoteErrors(val) : 19 nodes produced errors; first error: 'subject' is not an exported object from 'namespace:Biostrings' In addition: There were 39 warnings (use warnings() to see them)

The pwalign error is still there and the others warnings are related to parallelization {library(parallel)} where the system closes unused connections opened up for parallel analysis.

warnings() Warning messages: 1: In .call_fun_in_pwalign("pairwiseAlignment", ...) : pairwiseAlignment() has moved to the pwalign package. Please call pwalign::pairwiseAlignment() to get rid of this warning. 2: In for (i in seq_along(cl)) cl[[i]] <- newPSOCKnode(names[[i]], ... : closing unused connection 59 (<-localhost:11050)

This time I used the following code and the raw annotation gbk files used are the files in importing multiple gbk files tutorial.

Run Blastp

BlastP_results <- geneviewer::protein_blast( folder_path, query = "BGC0001288", id = "protein_id", # Name of column containing gene identifiers. cluster = "cluster", # Name of column containing cluster identifiers. identity = 30, parallel = TRUE )

Thank you.

nvelden commented 4 months ago

Could you try once more? The function now requires the latest version of Biostrings and pwalign to be installed. Previously, I attempted to make it also work with the old version of Biostrings where the pairwiseAlignment function is still included but this seemed to cause conflicts.

Johnny254 commented 4 months ago

Hi,

It worked. The BlastP issue is now resolved.

No errors now.

_BlastPresults is generated successfully and the five new columns look good.

I'll now proceed on with the tutorial and implementation in my analysis.

Thank you.

Johnny254 commented 4 months ago

Hi,

It worked. The BlastP issue is now resolved.

No errors now.

_BlastPresults is generated successfully and the five new columns look good.

I'll now proceed on with the tutorial and implementation in my analysis.

Thank you.

The implementation was successful. Thank you.