how to do manual search on NCBI with biopython and add link to publication - biopython

I'm trying to reproduce manual search on NCBI with biopython but obviously something is not good in my code..
NCBI gives me that : "Microbacterium"[Organism] AND "latest refseq"[filter] AND (all[filter] NOT partial[filter])
i'm trying :
query = "Microbacterium[Organism] AND latest refseq[filter] AND (all[filter] NOT partial[filter])"
handle = Entrez.esearch(term=query, db="nuccore", retmax=600)
ids = Entrez.read(handle)["IdList"]
but ids is empty, i'm supposed to find 512 genomes that i would like to get after.
if someone has an idea where i did mistake?
and to add point to my question, does everyone know if we can get only genomes related to a published paper?
thanks a lot!

Related

Twitter Premium API

I hope you guys are best with your health and development works. I encountered a problem i.e. Twitter is not giving me maximum amounts of tweets, and I am not satisfied with premium. For sure, there will be my development fault. I’d diagnosed with a problem below, can you guys please tell me what will be the best possible solution for this?
Moreover can you please tell me the reason why I am not getting maximum amount of tweets WHEN NO FILTERS ARE APPLIED TO THE RULE?
SEARCH_TWEETS_URL = 'https://api.twitter.com/1.1/tweets/search/30day/development.json'
headers = {'Authorization': 'Bearer {}'.format(access_token)}
payload = {"query": (hash_one) -is:retweet}
response = requests.get(SEARCH_TWEETS_URL,params=payload,headers=headers).json()
whereas, hash_one is the user input of #tags or #TwitterHandles or Keywords.
I want to negate the retweets , in which pycharm IDE is giving me syntax error.
I’d also tried with hard-coded handles, #tags:
payload = {"query": "(#thePSLt20) -is:retweet"}
But its searches for “hash_one” and results me in empty string of tweets.
Its not working either way. :/
Please help :)

Office 365 Calendar API

I am new to Office 365 api. I got online and tried to used the microsoft virtual academy and other similar to it. I followed the direction from this site linkhttps://msdn.microsoft.com/office/office365/howto/authenticate-and-use-services; step for step, but I am getting an error that looks like thisError message
The steps are not hard at all. When I go into debug mode these two lines always come back null. There is very little information out there about these two lines.
var signInUserId=ClaimsPrincipal.Current.FindFirst(ClaimTypes.Email).Value;
var userObjectId = ClaimsPrincipal.Current.FindFirst("http://schemas.microsoft.com/identity/claims/objectidentifier").Value;
If you are looking for my code it is provided in the link I gave above. Those are all my files. To the T. Thanks in advance for any help.
Question 1. Do anyone have better resources other than the ones I am using
Question 2. Can those lines be null.
Question 3. Where can I find a SOLID tutorial online that works 100%
The error is because that there is no “mail” type data in the claims. To construct the AuthenticationContext object, we should use the ‘ClaimTypes.NameIdentifier’ as the ’signInUserId’ instead of ‘ClaimTypes.Email’.
And you can refer to the whole sample code from here.

QBD Query by Customer Name (DevKit)

I think this has been asked before, but I'm going to give it another shot in the hope of getting a useful answer.
Using the DevKit and C# (not XML) how can I look up a customer by name? In the SDK it was a no-brainer to look up a customer by FullName, but now I can't find any way to do it. It defies common sense that the DevKit wouldn't provide a way to do this.
Please don't reply with links to documentation that doesn't have the answer (I've read it several times), or XML that doesn't work. I'd love to see C# code that does this (heck, I'll even settle for VB), but if it can't be done, please just tell me so I can end this and get some rest.
var qbdCustomerQuery1 = new Intuit.Ipp.Data.Qbd.CustomerQuery();
qbdCustomerQuery1.Item1ElementName = Intuit.Ipp.Data.Qbd.Item1ChoiceType.FirstLastInside; qbdCustomerQuery1.Item1 = "Popeye";
List CustomerQueryResult = qbdCustomerQuery1.ExecuteQuery(context).ToList();
This should work.
We will try to improve the docs for such queries.
Can you give it a try
ServiceContext context = new ServiceContext(oauthValidator, appToken, realmId, IntuitServicesType.QBD)
CustomerQuery customerQuery = new CustomerQuery();
customerQuery.FirstLastName ="?"
IEnumerable<Customer> customers = customerQuery.ExecuteQuery<Customer>(context);
Ref - https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits/0100_ipp_.net_devkit/query_filters/quickbooks_desktop
In the client side, you can loop through 'customers' and use an if condition for only customer's name.
Thanks

Rails to_s Mechanics

Hey guys this has been tripping me up quite a bit. So here is the general problem:
I am writing an application that requires users to enter their Summoner Names from league of legends. I do a pretty simple data scrape of a match and enter the data into my database. Unfortunately I am having some errors registering users with "special characters".
For this example I will use one problem user: RIÇK
As you can see RICK != RIÇK. So when I do the data scrub from the site I get the correct value which I push onto an array for later use.
Once I need the player names I pull from the array as follows: (player_names is the array)
#temp_player = User.find_by_username(player_names[i].to_s)
The problem is the users with any special characters are not being pulled. Should I not be using find_by? Is to_s changing my original values? I am really quite lost on what to do and would greatly appreciate any help / advice.
Thanks in advance,
Dan
I would like to thank Brian Kung for the link to the following: joelonsoftware.com/articles/Unicode.html It does a great job giving the bare minimum a programmer truly needs to understand.
For my particular issue I had used a HTML scraper to get the contents but which kept HTML entries throughout. When using these with my SQL lookups it was obvious that things were not being found. In order to fix this I used the HTMLEntities Gem to decode the text as follows (as soon as I put the into the array originally):
requires 'RubyGems' #without this cannot include htmlentries as a gem
requires 'HTMLEntries'
coder = HTMLEntries.new
line = '&lt;'
player_names.push(coder.decode(line))
The Takeaway
When working with text and if running into errors I would strongly recommend tracing the strings you are working with to the origin and truly understanding what encoding is being used in each process. By doing this you can easily find where things are going wrong.

Need assistance getting (parsing?) these JSON data into Xcode

Before I start, I would like to say that I'm quite a newbie to Xcode and the C Language, and I'm trying my best to learn as much as I can. I have researched for about 2 days now before posting this question but could not find anything helpful :( I am genuinely stuck and would appreciate ANY help. This is most likely a very simple/basic question:
Basically, I am trying to get this data (LINK) which is apparrently in UTF-8 JSON and display it on a simple label on Xcode. However, I do not know how to get that data and parse it at all. I've followed a tutorial online with success, but that deals with JSON objects rather than arrays (which I think I am dealing with).
I would HIGHLY appreciate it if someone could extract/parse the data from the first link given into a basic label on Xcode in code format.Preferably with commentary on what most lines of code are doing for my own benefit, as this would really help me understand how it works. Hopefully from there, I would be able to make good progress.
Once again this is highly appreciated!
Thank YOu.
Here's a sample of the JSON URL for convenience if you don't want to click the link:
[4,"1.0",1343920773538]
[1,"Spring Gardens","59581","275","Barkingside",1343920940000,1343920940000]
[1,"Spring Gardens","59581","275","Barkingside",1343921717000,1343921717000]
[1,"Spring Gardens","59581","549","Loughton",1343921858000,1343921858000]
[1,"Spring Gardens","59581","275","Barkingside",1343922204000,1343922204000]
[2,"Spring Gardens","59581","8a56a0ab37b72b400137cb7cfd954038_29222",0,3,"Bus routes serving this stop are subject to change during the Olympics and Paralympics games. For more information visit www.tfl.gov.uk/buses for more information.",1344668400000]
Use JSONObject like that tutorial shows, you should get a NSDictionary or NSArray at the end which will contain all your values just map those to the label in the end.
If you dont wan to do that, save the response in a char array and navigate through it while checking for [ or " characters when you find one read the chars until the next occurrence and save all the data you read into an array or something but this is messy and involves atleast 3-4 hours of writing your own custom logic for JSON data decryption, you should use JSONObject which is pretty simple
Hi i have this same problem. I have been looking for a json solution and currently i found that the best way to deal with this data is to parse is as csv instead. The solution seems straight up when you try to parse it as CSV instead of JSON

Resources