Skip to content

straw flips output columns x and y based on chromosome names #141

@TriLab-bioinf

Description

@TriLab-bioinf

Hi,

When I use straw function to extract observed contacts between two chromosomes, the returned x and y columns are flipped based on the position of the sorted chromosome names. For instance for the command below, x column should hold the coordinates of chromosome 2R and column y the coordinates of chromosome 2L. However, they are flipped (x = 2L coords and y = 2R coords).

contacts.df <- strawr::straw(norm = norm, fname = hic,
              chr1loc = "2R", chr2loc = "2L",
              unit = dist_unit, binsize = bin_size, matrix = matrix)

If, instead, I set chr1loc = "2L" and chr2loc = "2R", then I get the expected behavior: x = 2L coords and y = 2R coords.

This behavior causes several issues with the analysis downstream. Would it be possible to change this behavior or at least have straw to return the actual chromosome names as column names rather than x and y?

Thanks

Hernan

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