retrieveEdgeList: Retrieve an edge list from the provided PMIDs

Description Usage Arguments Details Value See Also Examples

View source: R/retrieveEdgeList.R

Description

'retrieveEdgeList' Retrieves a citation network edge list for a set of PMIDs

Usage

1
2
retrieveEdgeList(pmids, batchSize = 200, conMysql = NULL,
  lastUpdate = NULL)

Arguments

pmids

a vector of PMIDs look-up.

batchSize

the batch size to use for NCBI look-ups.

conMysql

a MySQL connection

lastUpdate

date string, in YYYY-MM-DD format, to use a threshold for updating target PMIDs in the database

Details

This function works as follows:

1. If a MySQL connection is not specified, retreive citation information from NCBI.

2. If a MySQL connection is specified and 'lastUpdate' is not NULL, then get the edge list from the database, for targets that have been updated after 'lastUpdate'. If 'lastUpdate' is NULL, then all target PMIDS in the database are used. For other target PMIDs, get citation information from NCBI.

If a MySQL connection is specified, the updated edge list and target PMIDs are stored in the database. Note that if a target PMID is updated, previous records with that target PMID are deleted from the database.

Value

An edge list (data.frame) with one column for Target PMIDS and one column for Source PMIDS.

See Also

get_pmc_cited_in and generateEdgeList for obtaining edge_list citation results from NCBI

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
pmid <- 21876761
pmids1 <- c(21876761, 311, 29463753, 21876726)

# This will create tables and insert edge list from one pmid "21876761",
# for a valid con_mysql
# This gets everything from NCBI if there is no database
res1 <- retrieveEdgeList(pmid, conMysql = con_mysql)

# This will not create new tables or insert edge list. This will just take everything from DB.
# res2 == res1
res2 <- retrieveEdgeList(pmid, conMysql = con_mysql)

## End(Not run)

gdancik/pmc2nc documentation built on May 5, 2019, 7:09 a.m.