jtamames / SqueezeMeta

A complete pipeline for metagenomic analysis
GNU General Public License v3.0
365 stars 78 forks source link

Error loading Squeezemeta data into R4.2.2 #595

Closed yasiromics closed 1 year ago

yasiromics commented 1 year ago

Hi everyone!!

When I try loading my Squeezemeta data into R, it has the following error

Error in read.table(sprintf("%s/intermediate/18.%s.contigsinbins", project_path, : no lines available in input In addition: Warning messages: 1: In readLines(file, skip) : line 1 appears to contain an embedded nul 2: In readLines(file, skip) : incomplete final line found on 'E:/WWTP/intermediate/18.WWTP.contigsinbins'

plz help

fpusan commented 1 year ago

That's a new one... can you share the 18.WWTP.contigsinbins file with us? I see that you are trying to load the project in windows (which should be fine). Does the same error happen when you run loadSQM in the linux server and conda environment in which you originally ran SqueezeMeta?

yasiromics commented 1 year ago

I didn't try it in Linux yet. I prefer to do the analysis on my PC that has windows OS.

I am not able to attach the file here. Can I email you please?

fpusan commented 1 year ago

I received the file. I can not reproduce the bug in my Windows PC (RStudio 4.2.1). Can you try just loading the file in RStudio without calling loadSQM?

read.table('18.WWTP.contigsinbins', header=T, sep='\t', quote='', comment.char='', skip=1, as.is=T)

yasiromics commented 1 year ago

R version 4.2.2 (2022-10-31 ucrt) -- "Innocent and Trusting" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

library('SQMtools')

This is SQMtools version 1.6.1

SQMtools is an open source software package distributed under GNU General Public License version 3 (GPLv3). Details of GPLv3 is available at http://www.gnu.org/licenses/gpl-3.0.html.

If using it in publications or products, please cite:

Puente-Sánchez F., García-García N. and Tamames J., SQMtools: automated processing and visual analysis of ’omics data with R and anvi’o. BMC Bioinformatics 21, 358 (2020). doi: 10.1186/s12859-020-03703-2.

read.table('18.WWTP.contigsinbins', header=T, sep='\t', quote='', comment.char='', skip=1, as.is=T) Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file '18.WWTP.contigsinbins': No such file or dir

fpusan commented 1 year ago

Yes, you need to replace 18.WWTP.contigsinbins with the actual path to the file in your PC (E:/WWTP/intermediate/18.WWTP.contigsinbins). Can you open the file normally with notepad?

yasiromics commented 1 year ago

Done. Thank you!

fpusan commented 1 year ago

What fixed it?

yasiromics commented 1 year ago

I deleted the 18.WWTP.contigsinbins file from intermediate. Then I copied it again from the workstation where I run SQM and pasted back to intermediate. It got fixed. Maybe there was some issue with copying the stuff. Thanks

On Thu, 15 Dec 2022 at 16:32, Fernando Puente-Sánchez < @.***> wrote:

What fixed it?

— Reply to this email directly, view it on GitHub https://github.com/jtamames/SqueezeMeta/issues/595#issuecomment-1352897388, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYNH62FRFVULSKKN7ACOOI3WNL3DZANCNFSM6AAAAAASWPRQPA . You are receiving this because you authored the thread.Message ID: @.***>

--

Regards,

Yasir Bashir (PhD) Project Scientist-I Interdisciplinary Biotechnology Unit, Aligarh Muslim University, Aligarh-202002, UP, India.

fpusan commented 1 year ago

Glad to hear! Closing issue