Thursday, November 26, 2015

git push remember username and password

going to your repository on github website

click the ssh link on the right and update the URL of your origin remote like this:
git remote set-url origin git@github.com:username/repo.git
source:http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password

Thursday, November 19, 2015

[solved] how to make your github repository private /change privacy of folders

Follow these instructions:
https://help.github.com/articles/making-a-public-repository-private/

Wednesday, November 18, 2015

[Solved] How to download assembly information/chromInfo from UCSC

Go to the genome browser.  Click on the "Tables" menu item at the top. Select the clade, genome, and assembly.  For group, specify "All Tables" and for table, specify "chromInfo".  Set output format to "select fields" to send the output to the screen, leave output file blank. Otherwise specify a file.  --- Henry A

[solved]permission denied on server

-bash :  permission denied

When I tried sudo it didn't work because I didn't have the priviladge to do it.

The correct thing to do is:
chmod a+x scriptname

Without even using sudo

Tuesday, November 17, 2015

How to check what command/task/process is running on a linux server

$ ps -ewwo pid,args | grep [s]sh


Source: http://www.cyberciti.biz/faq/unix-linux-determine-whether-process-is-running/
Output:
5341 /usr/sbin/sshd
 5864 /usr/bin/ssh-agent x-session-manager
 6289 ssh oldbox
 7126 ssh admin@core.r1.vsnl.router
Where,
  • ps : Command name
  • -ewwo pid,args : -e option force to select all running processes. -o option is used to specify user-defined format. In our case we are forcing to display only program pid and its arguments. Finally -w option specifies wide output. Use this option twice for unlimited width.
  • grep [s]sh : We are just filtering out sshd string

Sunday, November 15, 2015

[html][solved]How to type a letter a with hat e.g Tucuman

just type
á 

Reference: http://symbolcodes.tlt.psu.edu/web/codehtml.html
http://character-code.com/czech_slovak_slovenian-html-codes.php

Saturday, November 14, 2015

[Solved] F-seq: Exception in thread "main" java.lang.ArithmeticException: / by zero

When running F-seq to do peak calls, I got the error message:

Exception in thread "main" java.lang.ArithmeticException: / by zero
        at edu.duke.igsp.gkde.KDEChromosome.run(KDEChromosome.java:325)
        at edu.duke.igsp.gkde.Main.main(Main.java:272)


It's generated by very poor quality data (low complexity)
This is a common error that can also be produced by eRange.
The developer didn't consider this case so they couldn't deal with this situation, but HOMER does.And HOMER can tell you that you call a very small number of peaks

The new hg38 annotation has mini-chromosomes which may have 0 peaks. And they make trouble.

Wednesday, November 11, 2015

[solved] How to force quit microsoft powerpoint which stops Mac from shutting down

I tried to shut down the computer but it was stopped due to powerpoint issue which can't quit.
To force quit:
1. click on the apple logo at the top left corner of the powerpoint window
2. click force quit

Saturday, November 7, 2015

How to change your gray color image into red using ImageJ

open imageJ

Open your picture

image -> Lookup Tables -> Red

[Solved]Why do images get “corrupted”/damaged after a USB transfer?

I found my own solution:

Whenever you insert you USB, your computer asks you to fix the problem of your USB.
Usually life is too short to do that.
However, fixing the USB(after you've backed up all the files) and repeat your file transfer is the solution

Thursday, November 5, 2015

How to create UCSC genome browser sessions

1. upload your tracks and move to your favourite locus
2. mydata -> sessions
3. name your session, and click submit ("Save current settings as named session:")

"No package 'gtextutils' found" even after you installed it

然後我才恍然大悟....原來說明頁面一開始就叫我直接打一行字
        # export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
 
打完再進行Fastx-toolkit的./configure
OK了....就這麼簡單....我看了快一小時....哀哀....初學者淡淡的哀傷 
 
zz from 

小安的隨意筆記

Error: The requested bed file ***(^*#(^*(^ could not be opend. Exiting!

That file may be empty. To skip the file, store a return in that file.

Extract Bowtie Stderr data

awk -F ":" '{print $2}' *.fq_stderr

Windows 7: Cannot Change Filename (Source and Destination filenames are the same)

This happened when I tried to remove the trailing space of filenames. 

For windows 7, they consider the filename unchanged after I remove the trailing space.

Therefore, the solution is: you not only remove the space, but also use a different name (say, add a '_' or '.' at the end of the filename). 

[windows7/win7] Install wireless printer by/using IP address 安装无线打印机

Install a printer in Windows 7 using an IP address.
1. Click Start and type print in the search box. Click Devices and Printers.
2. Select Add a printer.
3. Select Add a Network, Wireless, or a Bluetooth Printer.
4. The printer may appear in the box. If so, select it. If not click The Printer That I Want Isn’t Listed.
5. Select Add a printer using a TCP/IP address or hostname. Click Next.
6. Select TCP/IP Device in the Device type list.
Windows 7 - Adding printer by IP address
7. Type the hostname or the IP address of the printer. Click Next.
8. Windows 7 should find the printer if the printer is on and configured correctly. You may have to specify more information. If prompted, Select the type of network adapter installed in the printer in the Device Type drop-down list. You can also click Custom to specify custom settings for the network printer. Click Next.
Windows Vista will now walk you through installing the drivers for the printer. After that is complete, you should be able to print to the printer via direct IP address.

windows 如何去掉搜狗输入法悬浮皮肤标志

在搜狗中文模式下任意输入一个字母,按ctrl. + shift

How to create a cheatsheet using word

click the spacing between lines ---> remove the space after paragraph
---> choose the "at least" as spacing and choose 0 pt

如何显示windows隐藏的文件夹 Show hidden folders in win7

computer --> organize --> Folder and search options --->view --> click the button "show hidden files..."--> click OK
计算机 ---》 组织 --》 文件夹选项---》 查看---》显示隐藏文件

[solved]How to change the default download path of Firefox

tools>options>downloads and check 'ask me where to save every file' or right-click on the link and select 'save link as..'

SpliceTrap generating an extremely large file

The reason may be that all the reads have the same label.
>read
AATTTTTT
>read
ACCCCGG

R Error: '\U' used without hex digits in character string starting "C:\U"

replace all the \ with \\.
it's trying to escape the next character in this case the U so to insert a \ you need to insert an escaped \ which is \\

R: How to import data into a numeric vector

scan("my_file") # reads vector/array into vector from file or keyboard.

[Solved] Xtrafinder don't work under new Mac System (Maverick)

Just go to the website here:
https://www.macupdate.com/app/mac/42067/xtrafinder

Download and install again.

How to stop GOogle Voice Email notifications

If you frequently receive emails from google voice telling you that you've got a message some sb. you can stop it.


1. open Google voice on you computer, click the gear button at top right
2. click the tab VOicemail & text
3. uncheck the Forwarding text sessions

How to unlock adobe pdf file?

upload your pdf file onto http://freemypdf.com/

If you can view the pdf file but can't print it, you may simply use the website mentioned above.

[trick]How to create a cheatsheet for exam using word

click the spacing between lines ---> remove the space after paragraph
---> choose the "at least" as spacing and choose 0 pt

Find your IP Address on a Mac

  • Type the following command:
ifconfig |grep inet
  • You will see something that looks like this:
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::fa1e:dfff:feea:d544%en1 prefixlen 64 scopeid 0x5
inet 192.168.0.100 netmask 0xffffff00 broadcast 192.168.0.255
  • Your IP address is usually next to the last entry of ‘inet’ and in this case is 192.168.0.100, an IP address is always in the format of x.x.x.x but it will never be 127.0.0.1 because that is your machines loopback address. Because you can always ignore 127.0.0.1, this guarantees that your IP address will be the other IP between ‘inet’ and ‘netmask’

How to clean up and speed up your Mac

see what's loading in login items - preferences - users and groups - login items.

open activity monitor - under all processes - see what's using most of your cpu's resources - %CPU

highlight the one using the most %CPU and hit quit process

open disk utility - launchpad - utilities - disk utility

on disk utility - hit verify disk then go on to verify disk permissions - repair if needed.  restart your macbook.

see if that speeds up your macbook.

how to exit full-screen mac

1) Press cmd + shift + F, or 
2) While in full-screen, hover your mouse to the top, click on the View option, and select Exit fullscreen mode.

How do I copy music onto my Apple iPhone from Mac iTunes?

Dave's Answer:
As with much to do with the iPhone, there's a bit of a trick to getting this working smoothly so you can have control over your iPhone music, while keeping it as darn easy to work with as possible. The answer? Create a custom playlist for your iPhone music library.
Let me show you how to do it - it's pretty darn easy.
Pop into iTunes and choose File --> New Playlist. Now rename it to something logical: I use "iPhone Sync":
Apple iTunes in Mac OS X: New Playlist for iPhone
Now you can just drag and drop music from your iTunes library (in iTunes, needless to say) into this new playlist. When you're ready, you'll see a bunch of music happily ensconced in the playlist (remember, it's all just "pointers": the actual music files are still safely in the main music library, so if you delete something from a playlist , you haven't deleted the original music file itself):
Apple iTunes in Mac OS X: New Playlist for iPhone
Notice here on the very bottom of the iTunes window it shows you how many songs are in the playlist, along with the size and total playing time. For my current playlist, it's 140 songs, 10.1 hours, for a total file size of 851MB, no problem for my 4GB Apple iPhone.
At this point, you need to plug in your iPhone if you haven't already done so. It'll pop up the usual summary screen:
Apple iPhone: Summary view in iTunes
Cool. Now click on the "Music" tab and you'll see that you can select "sync playlist". Do that, then select the new iPhone sync playlist you've created, as shown here:
Apple iTunes in Mac OS X: Synchronizing New Playlist with iPhone
Set things up just as I have shown and that's all there is to it. Now click "Sync" in iTunes and it'll synchronize your playlist with the iPhone music library and next time you click on that ole' "iPod" button on the iPhone, your selections from you music library will be present.
Oh, and one really nice feature of creating this playlist is that you can manage it, adding and deleting songs to your heart's desire, even without your iPhone present. Whatever changes you make are instantly applied to your iPhone music library the very next time you synchronize the device. Suddenly even 8GB might feel small. :-)

64 bit or 32 bit? How to check your own Mac?

  1. Choose About This Mac from the Apple (?) menu in the upper-left menu bar, then click More Info.
  2. Open the Hardware section.
  3. Locate the Processor Name.
  4. Compare your Processor Name to information below to determine whether your Mac has a 32-bit or 64-bit processor.
Processor Name32- or 64-bit
Intel Core Solo32 bit
Intel Core Duo32 bit
Intel Core 2 Duo64 bit
Intel Quad-Core Xeon64 bit
Dual-Core Intel Xeon64 bit
Quad-Core Intel Xeon64 bit
Core i364 bit
Core i564 bit
Core i764 bit

How to put mac apps on the desktop

control + click on the icon;
make alias(shortcut);
move the alias to the desktop;

Screenshot shortcuts for mac

  1. To capture a portion of the desktop, press Command-Shift-4. A cross-hair cursor will appear and you can click and drag to select the area you wish to capture. When you release the mouse button, the screen shot will be automatically saved as a PNG file on your desktop. (The file is saved as PDF in Mac OS 10.3 and earlier.)
  2. To copy the entire desktop, press Command-Control-Shift-3. The screen shot will be placed on your clipboard for you to paste into another program.
  3. More to learn? http://graphicssoft.about.com/od/screencapturemac/ht/macscreenshot.htm

How to transfer google contacts to your iphone

You can use iTunes to upload existing Contacts from your Apple device to Gmail. Only the following information can be uploaded:
  • People's names and job titles
  • Company names
  • Email and postal addresses
  • Phone numbers
  • IM names, including the type of service
  • Notes

Here's how:

  1. Connect your iPhone, iPad, or iPod Touch to your computer using the USB cable.
  2. Open the iTunes application.
  3. Select your iPhone and click Info.
  4. Check the Sync Contacts with option and select Google Contacts from the drop-down menu.
  5. Click Configure and enter your Google username and password. 
  6. Press Apply to sync your device with iTunes.


Once you've checked that your contacts are available on the web, disable iTunes Contacts sync with Google. If you don't do this, you'll see duplicate contacts on your phone.

How to Turn the iPhone Ringer Off

To turn the iPhone ringer off and use iPhone silent mode, all you need to do is flip a switch.
On the upper left-hand side of the iPhone is a small switch. It’s just above the volume control and below the phone's corner. This is the iPhone ringer.

How to stop subscription of Pandora/an app on apple store

http://support.apple.com/kb/HT4098
To manage auto-renewing subscriptions:
  1. From your device's Home screen, tap App Store.
  2. Tap Featured at the bottom of the screen.
  3. Scroll to the bottom of the page.
  4. Tap the Apple ID button in the lower-left corner. (If you are not signed in, tap the Sign In button, and sign in with your Apple ID. Then, scroll back to the bottom of the page, and tap the Apple ID button.)
  5. Tap the View Apple ID button.
  6. Enter your password and tap OK.
  7. From the main account page, scroll down and tap Manage App Subscriptions. If you don't have app subscriptions this button will not be displayed.
  8. From the Manage App Subscription page on your iPhone, iPad, or iPod, tap the app that you would like to manage.
  9. Depending on the app, you'll have the option to manage different subscription categories.


     
  10. Once you tap a subscription category, you will see the current subscription status and available options.

    Subscription renewal options...

  11. Tap the desired renewal option to select it, and then tap Subscribe.

    Subscription renewal options; 180 days, subscribe."
     
  12. You will see a confirmation window asking you to confirm your purchase.
  13. Tap Confirm to proceed with your purchase.

Windows 8.1 no connection -- Dropbox connection failure

The solution is :
 use google DNS, enable public access of dropbox on windows firewall and restart.

How to use google DNS

Google Public DNS is the preferred DNS and is known for being fast, accurate and no restriction.
Step 1 – Navigate to Control Panel  >>  Network and Internet  >> Network and Sharing Center  >>  Change Adapter Settings.
Step 2 – Select the connection that you want to configure Google Public DNS.
For example:
– To change the settings for an Ethernet connection, right-click Local Area Connection, and click Properties.
– To change the settings for a wireless connection, right-click Wireless Network Connection, and click Properties.

Step 3 – Click on the Networking tab. Click on Internet Protocol Version 4 (TCP/IPv4) and then Properties.
Step 4 – Click on Advanced and then DNS tab.
If there is an existing IP address listed here, do write them down for future reference.
For Google Public DNS, select Use the following DNS server addresses:
Preferred DNS Server: 8.8.8.8
Alternate DNS Server: 8.8.4.4
Step 5 – Click OK and restart your network connection for changes to be applied.
You are now using Google Public DNS.

(original article: http://www.ipserverone.info/dns-2/change-dns-settings-to-google-dns-in-windows-7-8/)

How to display all the/more search results of google calendar

1.After you type in key words and start searching, latest records will be shown

2.Move your cursor to the 'mini calendar' on the left panel, click on a date earlier than the currently selected one (Make sure you only click once)

3. Now earlier records will be displayed now.


*Currently you can not display all the search results. What you can do is using this method to display more.

How to add your home folder to finder's side bar 怎样添加根文件夹至mac Fi

Press CMD+SHIFT+H to enter your Home folder in Finder, then press CMD+ArrowUp to get into the Users folder, from there drag the folder of your choice to the Sidebar.

How to type Greek letters on Mac. [Option + any key].

As long as you press Option while typing, the letters will be converted to the corresponding Greek letters listed below.

Greek letter key
α A A 
β Β B 
γ Γ G 
δ Δ D 
ε Ε E 
ζ Ζ Z 
η Η H 
θ Θ U 
ι Ι I 
κ Κ K 
λ Λ L 
μ Μ M 
ν Ν N 
ξ Ξ J 
ο Ο O 
π Π P 
ρ Ρ R 
σ Σ (medial sigma) S 
? Σ (final sigma) W 
? ? (lunate sigma) option + S 
τ Τ T 
υ Υ Y 
φ Φ F 
χ Χ X 
ψ Ψ C 
ω Ω V

How to disable auto correction of quote mark [mac text edit]

Edit --> Substitutions --> uncheck the smart quote

For other autocorrections it's the same

[Mac][Chrome]How to disable command + q Enable "Warn before quitting"

  • Click Chrome on the top menu bar.
  • Select Warn Before Quitting (?Q).
  • [Mac] How to lock screen/turn off display without shutting down

    control + shift + eject

    How to import/sync your iphone/apple contacts to gmail/google voice/google account

    1. log on to icloud, select contacts app
       https://www.icloud.com/#contacts
    2. click the gear button at left botton and choose 'select all'
    3. click the same gear button again and choose 'Export vCard'
    4. save that file on your desktop
    5. open Gmail page, click the triangle next to Gmail logo at top-left, select contacts
    6. click 'import contacts... ' at left column
    7. choose the file you saved from icloud.

    That's it

    Convert MOV to iMovie Supported MP4, DV or MOV

    use iDealshare VideoGo to convert .mov to mp4

    iMessage & group message not working?

    You must have played Candy Crush and cheated !

    Set the time back to Auto if you haven't done so.

    And then go to settings and message, enable your imessage and group message.



    After a while you can get some of your missing messages.


    Candy Crush is devil!!!

    How to build simlink on linux

    Create symlink example.

    1.  Log in on the system.



    2.  Now issue ln -s command to instruct Linux to create symlink to a file, the example below we make a link (shortcut) that call dns that link to /etc/resolf.conf the configuration file that contain DNS server name for our Linux system. 
    Linux create symlink
    [linux@fedora11 ~]$ ln -s /etc/resolv.conf dns
    [linux@fedora11 ~]$
    3.  To verify that the our symlink or symbolic link created successfully, issue ll command or ls -l --color=auto
    symlink or symbolic link
    [linux@fedora11 ~]$ ll
    total 32
    drwxr-xr-x. 2 linux linux 4096 2010-03-20 22:32 Desktop
    lrwxrwxrwx. 1 linux linux   16 2010-04-25 17:37 dns -> /etc/resolv.conf
    drwxr-xr-x. 2 linux linux 4096 2010-03-20 22:32 Documents
    drwxr-xr-x. 2 linux linux 4096 2010-03-20 22:32 Download
    drwxr-xr-x. 2 linux linux 4096 2010-03-20 22:32 Music
    drwxr-xr-x. 2 linux linux 4096 2010-03-20 22:32 Pictures
    drwxr-xr-x. 2 linux linux 4096 2010-03-20 22:32 Public
    drwxr-xr-x. 2 linux linux 4096 2010-03-20 22:32 Templates
    drwxr-xr-x. 2 linux linux 4096 2010-03-20 22:32 Videos
    [linux@fedora11 ~]$
    4.  issue cat command to test our new symlink / symbolic link working perfectly.  Note that dns is symlink to /etc/resolf.conf configuration file.
    test our new symlink symbolic link working perfectly
    [linux@fedora11 ~]$ cat dns
    # Generated by NetworkManager
    domain localdomain
    search localdomain
    nameserver 192.168.228.2
    [linux@fedora11 ~]$
    Read more on Linux symbolic link, Windows shortcut and Windows symbolic link, to know the different between them.
    Keywords: linux create symlink, linux create symbolic link, create syslink, create symbolic link, create linux symlink, create linux symbolic link, create symlink linux, create symbolic link linux  

    SAMTOOLS SAMFILE tags

    SAM format summary

    The Sequence Alignment/Map (SAM) format is a generic alignment format for storing read alignments against reference sequences. It is a text format for storing sequence data in a series of tab delimited ASCII columns and is commonly used in next-generation sequencing data processing. It is the (non-binary) human-readable version of the BAM format and contains information about the read and the aligned position in the genome. It was developed by Heng Li in Richard Durbins group and others, their paper is here.
    After a header section the alignment section describes all results of the aligned read data. The format is best explained with an example line:
    Code
    1:497:R:-272+13M17D24M  113  1  497  37  37M  15  100338662  0  CGGGTCTGACCTGAGGAGAACTGTGCTCCGCCTTCAG  0;==-==9;>>>>>=>>>>>>>>>>>=>>>>>>>>>>  XT:A:U  NM:i:0  SM:i:37  AM:i:0  X0:i:1  X1:i:0  XM:i:0  XO:i:0  XG:i:0  MD:Z:37
    Fieldname description Example-data
    QNAME read name 1:497:R:-272+13M17D24M
    FLAG alignment flag 113
    RNAME alignment chromosome 1
    POS alignment start position 497
    MAPQ overall mapping quality 37
    CIGAR alignment CIGAR string 37M
    MRNM/RNEXT name of next alignm. in group (mate) 15
    MPOS/PNEXT pos. of next alignm. in group (mate) 100338662
    ISIZE/TLEN observed Template LENgth 0
    SEQ sequence CGGGTCTGACCTGAGGAGAACTGTGCTCCGCCTTCAG
    QUAL quality per base 0;==-==9;>>>>>=>>>>>>>>>>>=>>>>>>>>>>
    TAGs further tags with alignment info
    XT:A:U NM:i:0 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:37
    The tags are optional and might vary between alignment programs. Shown are examples from BWA. Important for filtering are usually the tags X0:i (numbers of genome alignments of this read) and XM:i (number of mismatches in alignment).
           Tag Meaning
           NM Edit distance
           MD Mismatching positions/bases
           AS Alignment score
           BC Barcode sequence
           X0 Number of best hits
           X1 Number of suboptimal hits found by BWA
           XN Number of ambiguous bases in the referenece
           XM Number of mismatches in the alignment
           XO Number of gap opens
           XG Number of gap extentions
           XT Type: Unique/Repeat/N/Mate-sw
           XA Alternative hits; format: (chr,pos,CIGAR,NM;)*
           XS Suboptimal alignment score
           XF Support from forward/reverse alignment
           XE Number of supporting seeds
    The read name (at least from Illumina machines) are constructed as:
    [instrument-name]:[run ID]:[flowcell ID]:[lane-number]:[tile-number]:
    [x-pos]:[y-pos] [read number]:[is filtered]:[control number]:
    [barcode sequence]
    
    example:
    @M01117:25:000000000-A37B9:1:1101:14984:1386 1:N:0:4
    Sources:
    genome.sph.umich.ed with further useful details, full specs.