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

Add column to name the file during stats sub-command #18

Open
lpantano opened this issue Jan 18, 2018 · 1 comment
Open

Add column to name the file during stats sub-command #18

lpantano opened this issue Jan 18, 2018 · 1 comment

Comments

@lpantano
Copy link
Contributor

lpantano commented Jan 18, 2018

For that, it has to be implemented code at https://github.com/miRTop/mirtop/blob/dev/mirtop/gff/stats.py#L29.

As well, it has to be added one column to indicate the name of the file to be used. By default it should use the name of the file.

@shruthibandyadka
Copy link
Member

I'm sorry I wrongly referenced this issue in my previous pull request. It should have been Issue #24 instead. But I'll work on this if it's still open.
To clarify, did you mean the following ? -

def _calc_stats(fn):
 
    samples = _get_samples(fn)
  ..... 
    ##use this filename 'fn' to add a new column to the dataframe, containing fn. 
    with open(fn) as inh:
        for line in inh:
            if line.startswith("#"):
     ....... 
      df = _summary(lines)   ###HERE ADD NEW COLUMN TO THIS DF with name of file passed to function. 

@lpantano lpantano modified the milestones: v0.2.0, v0.3.0 Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants