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

Columns shifting when loading lifespan-change.tsv file with pandas and saving to SQLite #310

Closed
const8ine opened this issue Aug 22, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@const8ine
Copy link
Member

Description

I am experiencing an issue during the data loading phase. When I load the lifespan-change.tsv file using pandas and save it to an SQLite database, the data is shifted by one column.

Steps to reproduce

  1. Donwload dataset "lifespan-change.tsv" from https://open-genes.com/download by clicking a button "Changes in gene activity affect model organism lifespan"
  2. Load the TSV file with the following command:
    pd.read_csv(tsv_file, sep='\t')
  3. Save the data to an SQLite database or try to output them with any other way.

Expected behavior

The data should be correctly aligned according to the TSV structure.

Actual behavior

The data shifts by one column, leading to misalignment in the database. I noticed that one of the cells contains a tab character, which seems to cause an error stating that there are more cells than columns. However, this might not be the only issue.

Additional Information

The TSV file might be created with formatting errors, potentially including unintentional tab characters that break the structure.

@const8ine const8ine self-assigned this Aug 22, 2024
@const8ine const8ine added the bug Something isn't working label Aug 22, 2024
@const8ine const8ine changed the title Bug: Columns shifting when loading lifespan-change.tsv file with pandas and saving to SQLite Columns shifting when loading lifespan-change.tsv file with pandas and saving to SQLite Aug 22, 2024
const8ine added a commit that referenced this issue Sep 6, 2024
const8ine added a commit that referenced this issue Sep 6, 2024
const8ine added a commit that referenced this issue Sep 6, 2024
const8ine added a commit that referenced this issue Sep 6, 2024
const8ine added a commit that referenced this issue Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant