Note that there are some explanatory texts on larger screens.

plurals
  1. POregexp find and replace: bash variables inside sed
    primarykey
    data
    text
    <p>I would like to remove this sequence when present at the beginning of the line:</p> <p>ATCGGAAGAGCACACGTCTGAACTCCAGTCACTGACCAATCTCGTATGCCGTCTTCTGCTTG followed by at least 3 A characters. </p> <p>Both, sequence and multiple A should be removed and the rest of the file should be preserved. </p> <p>My input files look like this:</p> <pre><code>@M00946:3:000000000-A2WF2:1:1101:18115:1962 1:N:0:2 GATCGGAAGAGCACACGTCTGAACTCCAGTCACTGACCAATCTCGTATGCCGTCTTCTGCTTGAAAAAAAAAACATTTTCTTTCTTACTTCGTTCACTTTCCACTTCTTTCTCCCTATCTTCCCCCTTCTGTCTGCCCCAGCTGTCTATCCCACTTATTGTCTCCCCCCACTGCCCCACACTCCTACCTTCTTCATCTTCACCTAACACCTCCCGCTCCCTCCTTATCGTCTCTTATCCTTTCCTTGTTCC + ????????DDDDDDDDGGGGGGHHIIIIHHHIIIIFHIIIH/CGFHHIIIIHEDHHIIIIHI=5EEGFEHHEC+5,,4@,@,,....--..+77,,.6..6.....7.4..7.76=..-5.&gt;.4-)134-.5....-3*))0***1*********10*0**01*1*)''..0***.)0'))*****00*11******01***0****0*)**0)'''...*0)0*11********1****1*0******** @M00946:3:000000000-A2WF2:1:1101:19888:2900 1:N:0:2 GATCGGAAGAGCACACGTCTGAACTCCAGTCACTGACCAATCTCGTATGCCGTCTTCTGCTTGAAAAAAAAAAAACACAAATACCGTTCCAATATCTTTTTGTTTCATGTCTAATAAC + &lt;&lt;??????BB?BBBBBCAFFFCFHF;&gt;EFCDFGFFHFBGHCA=FHA&gt;EFGEE7CF&gt;F?FFHB=?EEGF&gt;&gt;DH5&lt;)++,++,4,,4+=:,,,,5,,,,,,,,),33?,3,3,3,,,,33 </code></pre> <p>I was trying to use script replace.sh which looks like this</p> <pre><code>file=$1; adapter_sequence=$2; sed -r "s/${adapter_sequence}A{3}//" $file </code></pre> <p>from the command line:</p> <p>./replace.sh file.fastq GATCGGAAGAGCACACGTCTGAACTCCAGTCACTGACCAATCTCGTATGCCGTCTTCTGCTTG</p> <p>It did not work. Any help in any script language will be appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload