Open zhangzhen opened 3 years ago
This is not possible in the javascript libraries (including Gosling.js) by a security policy of browsers. You will need to have a server that serves your local data since the browser cannot access your local files directly.
Can I ask how large the data is? Also, is the same data used multiple times in your specification? Would the use of a HiGlass server not be feasible in your case?
Can I ask how large the data is?
There are about 1 million lines in the data file.
Also, is the same data used multiple times in your specification?
Yes, because there are multiple value columns in that file.
Would the use of a HiGlass server not be feasible in your case?
I'm trying to use a HiGlass server to solve this issue. However, it is a bit tricky because I created a synthetic genome which has only chromosome 1 by removing regions that are not covered by probes. The coverage data file of a sample in the bedgraph format was converted to a hitile file using the following command:
clodius aggregate bedgraph \
RD2118193FFP.coverageData2.tsv \
--output-file RD2118193FFP.coverageData2.hitile \
--chromosome-col 1 \
--from-pos-col 2 \
--to-pos-col 3 \
--value-col 4 \
--assembly grch37 \
--nan-value NA \
--transform exp2 \
--has-header
The data is for only about 350 genes, attached below: RD2118193FFP.coverageData2.csv
And then the hitile file was uploaded to the higlass server. By viewing the coverage data in browser I find the converted data looks something goes wrong , but I don't figure out what step goes wrong.
@sehilyi A question about zoom levels: how can I know what the current zoom level is in gosling?
Zhen
A question about zoom levels: how can I know what the current zoom level is in gosling?
@sehilyi I've already found the answer to this question in the source code for higlass:
I've already found the answer to this question in the source code for higlass:
Sorry that my response was late but great to hear that you found the answer!
Just curious -- since those are HiGlass code-bases, are you using those functions in your custom local Gosling.js on your machine?
Just curious -- since those are HiGlass code-bases, are you using those functions in your custom local Gosling.js on your machine?
No, I've not used those functions yet, but just read the code. To other questions I still have not found answers. Is there a way to view the content of a hitile file just like the way to view a csv file? I want to make sure if hitile files that are created by us are in right form and meet our requirements.
Zhen
@zhangzhen Sorry for the late response.
When I test your file (i.e., aggregate and ingest to the server), I see the following view, which seems to look fine for me. Could you elaborate on the issue you are confronting?
Demo: http://higlass.io/l/?d=BOXopZfFS9-LTYLijCVekA
Also, you would want to use a --chromsizes-filename TEXT
parameter of clodius to specify what chromosome you want to use and how large it is since you seem to be interested in custom-sized chromosome 1 only.
Since Hitile is based on HDF5, you can use HDF5 viewers, such as HDFView to browse metadata (e.g., chromosome sizes, assembly, ...) as well as raw values.
I've put the tsv file RD2109054FFP.blockData.tsv into the public folder, and then set the data url in the spec as follows:
"url": "./RD2109054FFP.blockData.tsv"
Nothing is displayed in the corresponding track. To shorten the data loading time, I want to fetch the local file instead of the remote one. How can I do this?Zhen