Code Monkey home page Code Monkey logo

Comments (9)

GH-MStamboulian avatar GH-MStamboulian commented on September 27, 2024

@marco-mariotti

from pyranges.

endrebak avatar endrebak commented on September 27, 2024

I can have a look on Monday. Thanks.

from pyranges.

endrebak avatar endrebak commented on September 27, 2024

There is no risk here that the object passed in will be changed.

reindex creates new objects:

scdf, ocdf = scdf.reindex(_self_indexes), ocdf.reindex(_other_indexes)

from pyranges.

GH-MStamboulian avatar GH-MStamboulian commented on September 27, 2024

@endrebak thank you for looking into this. So what would be the most appropriate way to get rid of this warning? should I just suppress it?

from pyranges.

endrebak avatar endrebak commented on September 27, 2024

I am a bit surprised that it shows up. If you look at the code, you see that I turn off the warning.

from pyranges.

GH-MStamboulian avatar GH-MStamboulian commented on September 27, 2024

yes I have no idea why its still complaining. what pandas version are you using?

from pyranges.

endrebak avatar endrebak commented on September 27, 2024

2.0.1

from pyranges.

GH-MStamboulian avatar GH-MStamboulian commented on September 27, 2024

@endrebak I see, and do you still get this warning too with the newer pandas version?

from pyranges.

cmatKhan avatar cmatKhan commented on September 27, 2024

I believe I am seeing this, also, though I'm not sure it is the same FutureWarning.

test_gtf.txt

x = pr.read_gtf('test_gtf.txt')

x.features.introns(by='transcript').intersect(x[x.Feature=='exon'],strandedness='same', how='containment')

result:

	Chromosome	Source	Feature	Start	End	Score	Strand	Frame	gene_id	transcript_id
0	chr1	unknown	intron	15	19	.	+	.	gene1	transcript_1
1	chr1	unknown	intron	15	19	.	+	.	gene1	transcript_1

FutureWarning: The `inplace` parameter in pandas.Categorical.add_categories is deprecated and will be removed in a future version. Removing unused categories will always return a new Categorical object.
  introns.Feature.cat.add_categories(["intron"], inplace=True)

FutureWarning: In a future version, `df.iloc[:, i] = newvals` will attempt to set the values inplace instead of always setting a new array. To retain the old behavior, use either `df[df.columns[i]] = newvals` or, if columns are non-unique, `df.isetitem(i, newvals)`
  introns.loc[:, "Feature"] = "intron"

pyranges version info:

{'pyranges version': '0.0.120', 'pandas version': '1.5.2', 'numpy version': '1.23.0', 'python version': sys.version_info(major=3, minor=9, micro=18, releaselevel='final', serial=0), 'ncls': '0.0.65', 'sorted_nearest': '0.0.37', 'pyrle': '0.0.35', 'ray': 'not installed', 'bamread': 'not installed', 'pyranges_db': 'not installed', 'pybigwig': 'not installed', 'hypothesis': 'not installed'}

from pyranges.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.