These are chat archives for nextflow-io/nextflow

11th
May 2017
mitul-patel
@mitul-patel
May 11 2017 08:39
hello @pditommaso, I have tried this code :
mitul-patel
@mitul-patel
May 11 2017 09:27
  process index {
  input:
  file fasta from genome
  output: 
  val mode into something_ch   
  script: 
  def  mode="index" 
  """
  bowtie2-build --threads 8 ${fasta} genome.index
  echo $mode
  """
  }

  process mapping {
  input: 
  val mode from something_ch
  output: 
  val mode into something_ch2 
  script:  
  mode="mapping"
  """
  bwa aln ${ref} ${short_read} > aln_sa.sai 
  echo $mode
  """
  }
Shellfishgene
@Shellfishgene
May 11 2017 09:49
@pditommaso Beginner question: If I write the tests for my executor, how do I actually run them?
Paolo Di Tommaso
@pditommaso
May 11 2017 10:14
@mitul-patel If you want to output a script variable, you should not declare with def, sorry if I've suggest that
it should be
  output: 
  val mode into something_ch   
  script: 
  mode="index" 
  """
  etc 
  """
@Shellfishgene
As unit tests, see for example here
Shellfishgene
@Shellfishgene
May 11 2017 11:27
Yes, my question was how to I run those, what's the command line? I've never used groovy before...
Paolo Di Tommaso
@pditommaso
May 11 2017 11:44
@Shellfishgene ahh, like this make test class=nextflow.executor.PbsExecutorTest
Shellfishgene
@Shellfishgene
May 11 2017 11:46
Just figured that out, too :)
Paolo Di Tommaso
@pditommaso
May 11 2017 11:46
:+1:
mitul-patel
@mitul-patel
May 11 2017 13:30
Thanks @pditommaso. It is working now without def...
Paolo Di Tommaso
@pditommaso
May 11 2017 13:34
nice
Shellfishgene
@Shellfishgene
May 11 2017 15:19
@pditommaso I need some help to understand how task.config.memory works, where's the code for that? Specifically, how do I change it to return mb vs MB in my executor?
Paolo Di Tommaso
@pditommaso
May 11 2017 15:21
the relevant code is here
however is the problem is to convert MB to mb you can do like this task.config.memory.toString().toLowerCase()
Shellfishgene
@Shellfishgene
May 11 2017 15:22
thanks, I'll have a look
Shellfishgene
@Shellfishgene
May 11 2017 16:03
text?.eachLine{ String row, int index -> Does the index start at 0 or 1 here in groovy?
Seems to be 0...
Paolo Di Tommaso
@pditommaso
May 11 2017 16:16
groovy -> java -> C -> 0 based index ;)
Shellfishgene
@Shellfishgene
May 11 2017 16:20
@pditommaso Right :). So, I'm done with adding NQSII, and the tests are there and pass.
Paolo Di Tommaso
@pditommaso
May 11 2017 16:21
Great, a pull request will be welcome
Shellfishgene
@Shellfishgene
May 11 2017 16:24
I've never really used git/github before, I also committed the timestamp changes to Const.groovy, how do I remove that file from the pull request?
Paolo Di Tommaso
@pditommaso
May 11 2017 16:25
yes, please
Shellfishgene
@Shellfishgene
May 11 2017 16:25
How? :)
Paolo Di Tommaso
@pditommaso
May 11 2017 16:25
:)
have you pushed already ?
Shellfishgene
@Shellfishgene
May 11 2017 16:26
yes, just found I have to delete the file, push again, update the pull request?
Paolo Di Tommaso
@pditommaso
May 11 2017 16:27
how is path of your fork ?
Paolo Di Tommaso
@pditommaso
May 11 2017 16:28
let me give a look
Well, I'm not the author :)
put your name here
also if you have a link to any documentation would be useful
Shellfishgene
@Shellfishgene
May 11 2017 16:33
You're the author of 95% of the code in there ;)
Paolo Di Tommaso
@pditommaso
May 11 2017 16:33
well, if so add your name
then to remove the Const class do the following
git reset 2e6d5ce8c59eb327932014ff40fdb849161ee580
then commit again excluding Const.groovy
then push using -f option and open a pull request
Shellfishgene
@Shellfishgene
May 11 2017 16:43
the git reset above also removes the changes to ProcessFactory.groovy, right?
Paolo Di Tommaso
@pditommaso
May 11 2017 16:44
basically undo the git history until that commit id (ie. my last one in your fork)
but does not change your local files
Shellfishgene
@Shellfishgene
May 11 2017 16:53
Ok, done.
Time to go home, thanks for all the help!
Paolo Di Tommaso
@pditommaso
May 11 2017 16:54
Great thank you
Does not exist any documentation for this system ?
Shellfishgene
@Shellfishgene
May 11 2017 16:55
I don't know of any, it's not used a lot. If you google NQSII the third link is already our University cluster.
Paolo Di Tommaso
@pditommaso
May 11 2017 16:55
I see nice
Shellfishgene
@Shellfishgene
May 11 2017 16:56
The documentation we have is password protected, maybe they don't want it public
Paolo Di Tommaso
@pditommaso
May 11 2017 16:56
is this
Shellfishgene
@Shellfishgene
May 11 2017 16:56
Yes
Paolo Di Tommaso
@pditommaso
May 11 2017 16:56
fair enough
Shellfishgene
@Shellfishgene
May 11 2017 16:57
There is some minimal info there, also here: https://wickie.hlrs.de/platforms/index.php/Batch_system But no real documentation
Paolo Di Tommaso
@pditommaso
May 11 2017 16:57
good
Shellfishgene
@Shellfishgene
May 11 2017 16:57
Bye!
Paolo Di Tommaso
@pditommaso
May 11 2017 16:57
Bye!