Skip to content

Suggest: show filename, number of loci and number of individuals/samples in read_bed error message #9

@richelbilderbeek

Description

@richelbilderbeek

Dear genio maintainers,

Thanks for genio and its many tests!

The .bed format is not readable by humans. To read a .bed file, one needs to specify the number of loci and the number of individuals. However, when reading a .bed file, these numbers may have been incorrect. In that case, genio gives a clear error message:

<Rcpp::exception/C++Error/error/condition>
Error in `read_bed_cpp(file, m_loci, n_ind)`: Input BED file continued after all requested rows were read!  Either the specified the number of loci was too low or the input file is corrupt!

My suggestion is to add the .bed filename, number of loci and number of individuals in the error message:

<Rcpp::exception/C++Error/error/condition>
Error in `read_bed_cpp(file, m_loci, n_ind)`: Input BED file continued after all requested rows were read!  Either the specified the number of loci was too low or the input file is corrupt!
.bed filename: ~/my_file.bed
Number of loci: 42
Number of individuals: 314

This would definitely help my debugging sessions.

I would volunteer to add this, would GitHub Actions be active. I do volunteer to add GitHub Actions :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions