Skip to content

Commit

Permalink
download: fix PFM in gene downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
imedina committed Dec 31, 2023
1 parent fe4bba7 commit e2170df
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ private void loadPfmMatrices() throws IOException, NoSuchMethodException, FileFo
while ((tfbsMotifFeature = motifsFeatureReader.read()) != null) {
String pfmId = getMatrixId(filePattern, tfbsMotifFeature);
if (StringUtils.isNotEmpty(pfmId)) {
System.out.println(pfmId);
motifIds.add(pfmId);
}
}
Expand All @@ -125,9 +126,9 @@ private void loadPfmMatrices() throws IOException, NoSuchMethodException, FileFo
CellBaseSerializer serializer = new CellBaseJsonFileSerializer(buildFolder, "regulatory_pfm", true);
logger.info("Looking up " + motifIds.size() + " pfms");
for (String pfmId : motifIds) {
System.out.println(motifIds);
String urlString = "https://rest.ensembl.org/species/homo_sapiens/binding_matrix/ENSPFM" + pfmId
+ "?unit=frequencies;content-type=application/json";
System.out.println(urlString);
URL url = new URL(urlString);
RegulatoryPfm regulatoryPfm = mapper.readValue(url, RegulatoryPfm.class);
serializer.serialize(regulatoryPfm);
Expand Down

0 comments on commit e2170df

Please sign in to comment.