Difference between revisions of "Linux"

From www.wiki.chlamdb.ch
Jump to navigation Jump to search
Line 98: Line 98:
 
In the above example a BLAST task is executed for each pair of species and query that are received. When the task completes a new tuple containing the value for species and the file result is sent to the blastOuts channel.
 
In the above example a BLAST task is executed for each pair of species and query that are received. When the task completes a new tuple containing the value for species and the file result is sent to the blastOuts channel.
  
−
## make SSH listen to alternative port (eg 3389 rdp) ##
+
== make SSH listen to alternative port (eg 3389 rdp) ==
  
 
* edit "/etc/ssh/sshd_config"
 
* edit "/etc/ssh/sshd_config"
 
* add "Port 3389"
 
* add "Port 3389"

Revision as of 11:57, 27 November 2018

user/groups

create group and add users to the group

1sudo groupadd metagenlab
2
3# a: append
4# G: group
5sudo usermod -a -G <group> <user>
  • group file conf
1cat /etc/group

HDD

  • liste des disques
1lsblk -io KNAME,TYPE,SIZE,MODEL

utilisation des diques

1df -h

Docker

  • ubuntu network access problem
1sudo mv /etc/resolv.conf{,.bak}
2sudo ln -s /etc/resolv.conf /run/systemd/resolve/resolv.conf

Atom setup


NextFlow

  1. http://nextflow-io.github.io/patterns/index.html#_get_process_work_directory
  2. https://github.com/sanger-pathogens/companion/blob/master/annot.nf#L658
  3. https://nextflow-io.github.io/nf-hack18/training.html#_basic_language_structures_and_commands

Relauch killed jobs with increased ressources

process foo {

    memory { 2.GB * task.attempt }
    time { 1.hour * task.attempt }

    errorStrategy { task.exitStatus == 140 ? 'retry' : 'terminate' }
    maxRetries 3

    script:
    <your job here>

}

split input into chunks

channel.buffer(size:3)

group channel output into a single list

query = Channel.fromPath '*.fa'
species = Channel.from 'human', 'cow', 'horse'

process blast {

input:
    val species
    file query

output:
    set val(species), file('result') into blastOuts


"blast -db nr -query $query" > result

}

In the above example a BLAST task is executed for each pair of species and query that are received. When the task completes a new tuple containing the value for species and the file result is sent to the blastOuts channel.

make SSH listen to alternative port (eg 3389 rdp)

  • edit "/etc/ssh/sshd_config"
  • add "Port 3389"