Hi Avi,

I'd like to clarify, to make sure we're understanding your question right: the 
files are already on your user's local computer, and you want to save them the 
trouble of going to the custom track form and clicking on the "Browse..." 
button to upload a local file?

If so -- unfortunately links like 
http://genome.ucsc.edu/...&hgt.customText=/home/home/Desktop/x/x.bed don't work 
because our http server cannot peek into your computer's /home/ files (and that 
is a good thing!).  When you use your web browser to upload a file, it doesn't 
send us the file name, but rather the file contents.  

If the contents were very short, then you could try CGI-encoding them into a 
link:
http://genome.ucsc.edu/...&hgt.customText=browser%20position%20chr... but if 
the contents are not very short then that becomes a very long link and the web 
browser might not be able to handle it.  

The right way is to send the file's contents using the HTTP POST method and 
multipart/form-data type, as the custom track form does.  

I haven't tried this so I'm not sure of all of the details, but I think you can 
add an html form around each icon, that sets the CGI parameters and posts the 
file contents.  To see how our form works, use your web browser to view the 
page source of our 'add custom tracks' form, and search for 'multipart':

<FORM ACTION="../cgi-bin/hgCustom" METHOD="POST"  ENCTYPE="multipart/form-data" 
NAME="mainForm">
...

Your form's action will be http://genome.ucsc.edu/cgi-bin/hgTracks.  You can 
add hidden form inputs to set the necessary CGI params e.g. db and position.  
Next, search our page source for 'upload', and note the next line:

<INPUT TYPE=FILE NAME="hgt.customFile"></TD>

-- and here is where I'm not sure, but you could give this a try: add 
VALUE="/home/home/Desktop/x/x.bed" to the declaration, and finally add a submit 
button (perhaps your icon).  If it's ugly to have the file input displayed next 
to your icon, some CSS style could probably make it invisible.

Again, I have not tried the above suggestion, it is just an idea.  Hope it is 
useful, and please let us know at [email protected] if you have more 
questions,

Angie


----- "Hiram Clawson" <[email protected]> wrote:

> From: "Hiram Clawson" <[email protected]>
> To: "Fungazid" <[email protected]>
> Cc: [email protected]
> Sent: Tuesday, December 15, 2009 8:07:10 AM GMT -08:00 US/Canada Pacific
> Subject: Re: [Genome] Linking custom tracks to the genome browser 
> automatically
>
> Good Morning Avi:
> 
> I don't understand.  How would other users access files
> on your computer ?  Or, to put it another way, how do you
> transmit files to other users ?
> 
> If you want other users to use custom track files that you
> have created, you would have to make those files available
> to those users.  Somehow you would have to get those files
> to the users.
> 
> If you want the files to be secure, you can place access
> control on a WEB directory and give them a login password.
> You can use the .htaccess method to protect data on
> a WEB site directory:
>       http://httpd.apache.org/docs/1.3/howto/htaccess.html
> 
> --Hiram
> 
> Fungazid wrote:
> > Hi Hiram,
> > 
> > I want the annotation files to sit locally in the user's computer,
> and prefer not to put them in a website. I tried to put a formated
> annotation file named x.bed in my /home/home/Desktop/x, and then to
> connect to:
> > 
> >
> http://genome.ucsc.edu/cgi-bin/hgTracks?org=hg19&position=chr22:20100000-20140000&hgt.customText=/home/home/Desktop/x/x.bed
> > 
> > But the custom tracks located in x.bed are not shown in the genome
> browser website. In principle I want everything to run locally (except
> of calling the genome browser)
> > 
> > 
> > Avi
> > 
> > 
> > 
> > --- On Sun, 12/13/09, Hiram Clawson <[email protected]> wrote:
> > 
> >> From: Hiram Clawson <[email protected]>
> >> Subject: Re: [Genome] Linking custom tracks to the genome browser
> automatically
> >> To: "Fungazid" <[email protected]>
> >> Cc: [email protected]
> >> Date: Sunday, December 13, 2009, 7:37 PM
> >> Good Morning Avi:
> >>
> >> Can you create an HTML page of URL links to the browser
> >> that reference your custom tracks ?  Please note the
> >> discussion of "Sharing Your Annotation Track with Others"
> >> on this page:
> >> http://genome.ucsc.edu/goldenPath/help/customTrack.html
> >>
> >> Will this method work for your application ?  There
> >> should
> >> be no need to bother your users with pasting custom track
> >> data.
> >>
> >> Alternatively, you could arrange your custom tracks into
> >> groups in saved session data and refer your users to
> >> the sessions.
> >>
> >> --Hiram
> >>
> >> Fungazid wrote:
> >>> Hello genome browser people,
> >>>
> >>> I have a very large list of genomic regions sets
> >> (~10,000 sets), their coordinates, and their custom tracks.
> >> In principle, I can copy each custom track text from the
> >> list, place it in the genome browser form, submit it, and
> >> watch it graphically in the browser. This is OK, but is
> >> there some tool or method that allow me to click on custom
> >> track icons and directly go to the browser without needing
> >> to repeat the "copy-paste-submit-clean" procedure again and
> >> again ? If this is possible it can is very very useful for
> >> me because it allow me give my data to other users without
> >> irritating them with the copy-paste procedure
> >>> Thanks in advanced Avi
> >>>
> >>>
> >>>    
> >>    _______________________________________________
> >>> Genome maillist  -  [email protected]
> >>> https://lists.soe.ucsc.edu/mailman/listinfo/genome
> >>>
> > 
> > 
> >       
> > 
> > 
> _______________________________________________
> Genome maillist  -  [email protected]
> https://lists.soe.ucsc.edu/mailman/listinfo/genome
_______________________________________________
Genome maillist  -  [email protected]
https://lists.soe.ucsc.edu/mailman/listinfo/genome

Reply via email to