Navigation

    Links

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    1. Home
    2. Matt
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups

    Matt

    @Matt

    375
    Posts
    361
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Matt Follow
    Matt's Group-6 PrivilegedUser's Group-1 Matt's Group-3 Matt's Group-2 Matt's Group-5 Matt's Group-4 Matt's Group-1

    Posts made by Matt

    • RE: How to...

      How to search for a file on linux and suppress error messages and stop once the first instance is found:

      find /home/files -xdev -type f -name 'P13.txt' -print -quit 2>/dev/null
      
      
      posted in Matt
      Matt
    • RE: How to...

      How to show fold changes in an excel spreadsheet when there are 0 values in the denominator. In the example below P30 is the numerator and P2 is the denominator. The logic is:

      1. Both numerator and denominator = 0 → output 0.00

      2. Denominator = 0, numerator ≠ 0 → output >{numerator} (2 decimals)

      3. Numerator = 0, denominator ≠ 0 → output <{denominator} (2 decimals)

      4. Otherwise → output normal division with 2 decimals.

      =IF(AND(P30=0,P2=0),"0.00",
         IF(P2=0,">"&TEXT(P30,"0.00"),
            IF(P30=0,"<"&TEXT(P2,"0.00"),
               TEXT(P30/P2,"0.00"))))
      
      posted in Matt
      Matt
    • RE: How to...

      How to apply for a Visa on Arrival for Indonesia online before you travel:

      A Visa on Arrival (VOA) is available for passport holders in many countries including Australia. It costs US$35 (A$50) and is valid for 30 days. Follow the link below to apply.

      https://evisa.imigrasi.go.id/

      posted in Matt
      Matt
    • RE: How to...

      How to re-use a file channel and indeterminate number of times (eg combining with a channle with an unknkown number of elements in NextFlow DSL1:

      process collectGVCF {
        publishDir "${params.combined_1_vcf}", mode: 'copy'
      
        output:
          set val(pair_id), val(round), file("${pair_id}_raw_variants_${round}.vcf.gz") into collected_vcf
      }
      
      // Later after splitting:
      sample_files
        .map { it -> it.getBaseName() }
        .combine(Channel.fromPath("${params.combined_1_vcf}/*_raw_variants_1.vcf.gz"))
        .set { reuse_pairs }
      
      posted in Matt
      Matt
    • RE: How to...

      How to conditionally choose from two channels in NextFlow:

      grouped_interval_vcf_ch=(params.splitIntervalOverlapLength && params.splitIntervalOverlapLength.toInteger() > 0
      	? trimmed_vcf_ch
      	: interval_vcfs_3
      )
      
      posted in Matt
      Matt
    • RE: How to...

      How to collect all files related by prefix in NextFlow:

      Example input channel:

      interval_bams_ch:
      [ file('73-50_L001_raw_variants_1.bam') ]
      [ file('73-50_L001_raw_variants_2.bam') ]
      [ file('73-50_L002_raw_variants_1.bam') ]
      [ file('73-50_L002_raw_variants_2.bam') ]

      Process code:

      bam_name_parts_ch = interval_bams_ch.map { file ->
          def name = file.baseName.replaceFirst(/_raw_variants_.*/, '')
          tuple(name, file)
      }.groupTuple()
      

      Example output:

      [ '73-50_L001', [file('73-50_L001_raw_variants_1.bam'), file('73-50_L001_raw_variants_2.bam')] ]
      [ '73-50_L002', [file('73-50_L002_raw_variants_1.bam'), file('73-50_L002_raw_variants_2.bam')] ]

      posted in Matt
      Matt
    • RE: How to...

      How to collect all files from one channel and associate/combine them with elements of another channel in NextFlow:

      Example Input channels:

      bam_for_collect_ch2:
      [ file('73-50_L002.bam') ]
      [ file('73-50_L001.bam') ]

      interval_vcfs_3:
      [ file('73-50_L001_raw_variants_1.vcf.gz') ]
      [ file('73-50_L001_raw_variants_2.vcf.gz') ]
      [ file('73-50_L002_raw_variants_1.vcf.gz') ]
      [ file('73-50_L002_raw_variants_2.vcf.gz') ]

      Process code:

      input:
      set val(pair_id), val(all_vcf) from bam_for_collect_ch2.map({ file -> file.baseName }).combine(interval_vcfs_3.collect().map({ file -> file.baseName }).toList())
      

      Example output:

      [ '73-50_L002', ['73-50_L002_raw_variants_1.vcf.gz', '73-50_L002_raw_variants_2.vcf.gz'] ]
      [ '73-50_L001', ['73-50_L001_raw_variants_1.vcf.gz', '73-50_L001_raw_variants_2.vcf.gz'] ]

      posted in Matt
      Matt
    • RE: Links

      Turing machine simulator

      posted in Matt
      Matt
    • RE: How to...

      How to get rid of "WARNING : No mitochondrion chromosome found" in SnpEff:

      Prefix the contig name with MT.

      posted in Matt
      Matt
    • RE: Links

      KASP assay design

      posted in Matt
      Matt