Mercurial > repos > mvdbeek > damid_deseq2_to_peaks
changeset 1:edca422b6cd6 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/damid_deseq2_to_peaks commit 77e1df794a4bceebf80dc0d800c18577c531a277
author | mvdbeek |
---|---|
date | Tue, 08 Jan 2019 04:01:54 -0500 |
parents | 3fd7995da4fd |
children | |
files | damid_deseq2_to_peaks.py test-data/peaks.bed test-data/test_data.tab |
diffstat | 3 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/damid_deseq2_to_peaks.py Mon Jan 07 12:58:55 2019 -0500 +++ b/damid_deseq2_to_peaks.py Tue Jan 08 04:01:54 2019 -0500 @@ -26,7 +26,7 @@ def significant_gatcs_to_peaks(df, p_value_cutoff): # Add `pass` column for sig. GATCs df['pass'] = 0 - df.loc[df[6] < p_value_cutoff, 'pass'] = 1 + df.loc[(df[6] < p_value_cutoff) & (df[2] > 0), 'pass'] = 1 # Create pass_id column for consecutive pass or no-pass GATCs # True whenever there is a value change (from previous value): df['pass_id'] = df.groupby('chr')['pass'].diff().ne(0).cumsum()
--- a/test-data/peaks.bed Mon Jan 07 12:58:55 2019 -0500 +++ b/test-data/peaks.bed Tue Jan 08 04:01:54 2019 -0500 @@ -1,2 +1,1 @@ 4 1 251 -4 301 501
--- a/test-data/test_data.tab Mon Jan 07 12:58:55 2019 -0500 +++ b/test-data/test_data.tab Tue Jan 08 04:01:54 2019 -0500 @@ -3,5 +3,5 @@ 4_201_251 169.22778018355 5.7093345566596 0.605350118969888 9.43145855224256 4.0442550874846e-21 1.15555073230549e-17 4_251_276 169.22778018355 5.7093345566596 0.605350118969888 9.43145855224256 4.0442550874846e-21 1.15555073230549e-1 4_276_301 169.22778018355 5.7093345566596 0.605350118969888 9.43145855224256 4.0442550874846e-21 1.15555073230549e-1 -4_301_401 412.221939093451 4.95034623243659 0.53002737065317 9.33979357770923 9.65221128246454e-21 2.46758781436206e-17 -4_401_501 165.881402812843 5.71524958810642 0.620499842499124 9.21071883771587 3.23948149277376e-20 6.66609779385658e-17 +4_301_401 412.221939093451 -4.95034623243659 0.53002737065317 9.33979357770923 9.65221128246454e-21 2.46758781436206e-17 +4_401_501 165.881402812843 -5.71524958810642 0.620499842499124 9.21071883771587 3.23948149277376e-20 6.66609779385658e-17