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

BiomTable.iterObservations not working in biom2 #540

Closed
george-weingart opened this issue Sep 17, 2014 · 5 comments
Closed

BiomTable.iterObservations not working in biom2 #540

george-weingart opened this issue Sep 17, 2014 · 5 comments

Comments

@george-weingart
Copy link

Hello,

I have code that was working in biom1 and now have to modify to work in biom2.
It was using BiomTable.iterObservations as follows but now in biom2 iterObservations is not working.

What is the easiest way to do it in biom2?

Thanks!

George Weingart

BiomObservations = BiomTable.iterObservations(conv_to_np=True)
for BiomObservationData in BiomObservations:
sBugName = str( BiomObservationData[1])
BiomTaxDataEntry = list()
BiomTaxDataEntry.append(sBugName)
BiomObservationsValues = BiomObservationData[0]
for BiomDataValue in BiomObservationsValues:
BiomTaxDataEntry.append(BiomDataValue)
BiomTaxDataWork.append(tuple(BiomTaxDataEntry))

@adamrp
Copy link
Contributor

adamrp commented Sep 17, 2014

Hi George,

Please review the documentation and the changelog before posting issues.
You can find the changelog in this repository, and the documentation is at
biom-format.org. to answer your question, that function has been renamed
simply "iter" and you pass which axis (sample or observation) as an
argument.
On Sep 17, 2014 1:10 PM, "george-weingart" notifications@github.com wrote:

Hello,

I have code that was working in biom1 and now have to modify to work in
biom2.
It was using BiomTable.iterObservations as follows but now in biom2
iterObservations is not working.

What is the easiest way to do it in biom2?

Thanks!
George Weingart

BiomObservations = BiomTable.iterObservations(conv_to_np=True)

for BiomObservationData in BiomObservations:
sBugName = str( BiomObservationData[1])
BiomTaxDataEntry = list()
BiomTaxDataEntry.append(sBugName)
BiomObservationsValues = BiomObservationData[0]
for BiomDataValue in BiomObservationsValues:
BiomTaxDataEntry.append(BiomDataValue)
BiomTaxDataWork.append(tuple(BiomTaxDataEntry))


Reply to this email directly or view it on GitHub
#540.

@george-weingart
Copy link
Author

Opened #541

@george-weingart
Copy link
Author

Hi Adam,

Thanks. Worked.

Where exactly is the change log you referred?
Where exactly it says that iterObservations was changed to iter?

Thanks for your help and prompt response.
George

@wasade
Copy link
Member

wasade commented Sep 17, 2014

The change log can be found here:
https://github.com/biocore/biom-format/blob/master/ChangeLog.md

Best,
Daniel
On Sep 17, 2014 3:37 PM, "george-weingart" notifications@github.com wrote:

Reopened #540 #540.


Reply to this email directly or view it on GitHub
#540 (comment).

@george-weingart
Copy link
Author

Thanks !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants