relative abundance of bins

Issue #74 resolved
Lauren Tom created an issue

Hi

How do I generate a table that shows the relative abundance of each of my MetaBAT2 bins across my sample set (rows are bins and columns are samples)? I am wanting something similar to the abundance file generated from MaxBin2.

Thanks,

Lauren

Comments (4)

  1. Rob Egan

    Hi Lauren,

    You could write a relatively simple script that reads the depths file and the bins.fa which calculates sum(length * depth) / sum(lengths) by row for for all scaffolds in a bin, and by column for each scaffold.

    I’ll make this issue a feature request and we will get to in in a bit. Feel free to submit a pull request if you write the script before we do.

    Thanks,

    Rob

  2. Boyang Zhang

    Hi, there I am also interested to calculate the abundance file.

    As you mentioned before, abundance = sum(length of bin * depth of bin in the sample) / sum(lengths of bins)

    relative abundance = scaled abundance in each sample.

    I wrote a python script to do the above steps.

    This my GitHub link: My Python script for abundance

    Please let me know any comments. Thanks in advance.

  3. Log in to comment