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

some error about get_pwy_abundance_v1.py #2

Open
weiguanyue opened this issue Nov 29, 2022 · 6 comments
Open

some error about get_pwy_abundance_v1.py #2

weiguanyue opened this issue Nov 29, 2022 · 6 comments

Comments

@weiguanyue
Copy link

this is my code : get_pwy_abundance_v1.py -i func.filtered.out -s /hl/weiguanyue/databases/funomic/FunOMIC.P.v1 -o1 pwy_abundance.csv -o2 pwyClass_abundance.csv -o3 pwyType_abundance.csv -o4 full_annotation.csv .
when I run ,the error is :
get_pwy_abundance_v1.py:68: DtypeWarning: Columns (3) have mixed types. Specify dtype option on import or set low_memory=False.
jgi_ann=pd.read_csv(ann_path,delimiter='\t',names=column_names,index_col=False)
get_pwy_abundance_v1.py:70: DtypeWarning: Columns (1) have mixed types. Specify dtype option on import or set low_memory=False.
rid_to_uniprot_species=pd.read_csv(uniprot_catalog,delimiter='\t',names=["rid","uniprotId","speciesID"],dtype={'first_column': 'str'},index_col=False)
Traceback (most recent call last):
File "get_pwy_abundance_v1.py", line 71, in
taxa=pd.read_csv(taxa_path, delimiter="\t",names=["speciesID","taxa"],index_col=False)
File "/miniconda3/lib/python3.9/site-packages/pandas/util/_decorators.py", line 211, in wrapper
return func(*args, **kwargs)
File "/miniconda3/lib/python3.9/site-packages/pandas/util/_decorators.py", line 331, in wrapper
return func(*args, **kwargs)
File "/miniconda3/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 950, in read_csv
return _read(filepath_or_buffer, kwds)
File "/miniconda3/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 611, in _read
return parser.read(nrows)
File "/miniconda3/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 1778, in read
) = self._engine.read( # type: ignore[attr-defined]
File "/miniconda3/lib/python3.9/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 230, in read
chunks = self._reader.read_low_memory(nrows)
File "pandas/_libs/parsers.pyx", line 808, in pandas._libs.parsers.TextReader.read_low_memory
File "pandas/_libs/parsers.pyx", line 866, in pandas._libs.parsers.TextReader._read_rows
File "pandas/_libs/parsers.pyx", line 852, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas/_libs/parsers.pyx", line 1973, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Expected 2 fields in line 1937, saw 6
I have check many times about the input file ,there are nothing wrong about the file ,so could you help me solve the problem?

@ilarioferrocino
Copy link

same error here:
Start removing bacterial reads for FP1
sys:1: DtypeWarning: Columns (3) have mixed types. Specify dtype option on import or set low_memory=False.
Traceback (most recent call last):
File "/home/administrator/programmi/FunOMIC/get_pwy_abundance_v1.py", line 69, in
blastx_out=pd.read_csv(sample_to_process,index_col=False,delimiter='\t',names=["qid","rid","id","lenght","mismatch","gapopne","qstart","qend","sstart","send","evalue","bscore"])
File "/home/administrator/miniconda3/lib/python3.7/site-packages/pandas/io/parsers.py", line 685, in parser_f
return _read(filepath_or_buffer, kwds)
File "/home/administrator/miniconda3/lib/python3.7/site-packages/pandas/io/parsers.py", line 457, in _read
parser = TextFileReader(fp_or_buf, **kwds)
File "/home/administrator/miniconda3/lib/python3.7/site-packages/pandas/io/parsers.py", line 895, in init
self._make_engine(self.engine)
File "/home/administrator/miniconda3/lib/python3.7/site-packages/pandas/io/parsers.py", line 1135, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "/home/administrator/miniconda3/lib/python3.7/site-packages/pandas/io/parsers.py", line 1917, in init
self._reader = parsers.TextReader(src, **kwds)
File "pandas/_libs/parsers.pyx", line 382, in pandas._libs.parsers.TextReader.cinit
File "pandas/_libs/parsers.pyx", line 689, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: [Errno 2] File b'output_folder_FP/functional_profiling/FP1.func.filtered.out' does not exist: b'output_folder_FP/functional_profiling/FP1.func.filtered.out'

someone can solve it?

@Justinwright973
Copy link

I am observing the same error when attempting to run this step/command, was anyone able to troubleshoot this issue so the python script can successfully run? I am stock at this step:

/home/wright2/funOMIC/get_pwy_abundance_v1.py:68: DtypeWarning: Columns (3) have mixed types. Specify dtype option on import or set low_memory=False. jgi_ann=pd.read_csv(ann_path,delimiter='\t',names=column_names,index_col=False,dtype={'fourth_column': 'str'}) /home/wright2/funOMIC/get_pwy_abundance_v1.py:70: DtypeWarning: Columns (1) have mixed types. Specify dtype option on import or set low_memory=False. rid_to_uniprot_species=pd.read_csv(uniprot_catalog,delimiter='\t',names=["rid","uniprotId","speciesID"],dtype={'first_column': 'str', 'second_column': 'str'},index_col=False) Traceback (most recent call last): File "/home/wright2/funOMIC/get_pwy_abundance_v1.py", line 71, in <module> taxa=pd.read_csv(taxa_path, delimiter="\t",names=["speciesID","taxa"],index_col=False) File "/home/wright2/miniconda3/envs/funomic/lib/python3.10/site-packages/pandas/util/_decorators.py", line 211, in wrapper return func(*args, **kwargs) File "/home/wright2/miniconda3/envs/funomic/lib/python3.10/site-packages/pandas/util/_decorators.py", line 331, in wrapper return func(*args, **kwargs) File "/home/wright2/miniconda3/envs/funomic/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 950, in read_csv return _read(filepath_or_buffer, kwds) File "/home/wright2/miniconda3/envs/funomic/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 611, in _read return parser.read(nrows) File "/home/wright2/miniconda3/envs/funomic/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1778, in read ) = self._engine.read( # type: ignore[attr-defined] File "/home/wright2/miniconda3/envs/funomic/lib/python3.10/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 230, in read chunks = self._reader.read_low_memory(nrows) File "pandas/_libs/parsers.pyx", line 808, in pandas._libs.parsers.TextReader.read_low_memory File "pandas/_libs/parsers.pyx", line 866, in pandas._libs.parsers.TextReader._read_rows File "pandas/_libs/parsers.pyx", line 852, in pandas._libs.parsers.TextReader._tokenize_rows File "pandas/_libs/parsers.pyx", line 1973, in pandas._libs.parsers.raise_parser_error pandas.errors.ParserError: Error tokenizing data. C error: Expected 2 fields in line 1937, saw 6

@zixuanxie
Copy link
Collaborator

Hi @ilarioferrocino , sorry for the late reply, this message was probably because there was no reads mapped to the functional db.

@ManichanhLab
Copy link
Owner

ManichanhLab commented Jul 31, 2023

Hi @weiguanyue and @Justinwright973 , this error was caused by some extra tabs in the annotation file, we have uploaded the FunOMIC-P db with corrected annotation file, could you please download and try again?

@Justinwright973
Copy link

Ok thank you!

I am attempting to access this new database, but the site will not load? (https://manichanh.vhir.org/funomic/) perhaps the DB is still updating there? I was able to access it previously. Thank you!

@ManichanhLab
Copy link
Owner

ManichanhLab commented Aug 2, 2023

Hi @Justinwright973 ,

Due to an issue with the server, the website was down for a couple of hours, now it should be working again.
Sorry for the inconvenience!

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

5 participants