If you don't know the adapter sequence but you suspect it is there because the reads are uniformly 36bp/50bp long, then follow this recipe (Linux):
Extract the first million sequence reads, then cut out the first 20 nt and then identify the most abundant 20 mers.
sed -n 2~4p sequence.fastq | cut -c-20 | sort | uniq -c | sort -k1gr | head
Take some of these sequences to miRbase and search by sequence. This will tell you the name of the most abundant miR and you can check the sequence of the canonical mature miR. Then take the sequence of the abundant mature miR (MIRSEQ) and "grep" the first 1000 out of the fastq file. Be sure to convert the "U" bases to "T".
grep -m1000 MIRSEQ sequence.fastq | sort | uniq -c | sort -k1gr | head
This will bring up the most common sequence that contains the abundant mature miR 21mer. The sequence directly after the miR sequence is the adapter sequence. You should then repeat this procedure with the 2nd most abundant miR to confirm the adapter sequence. You should be able to identify the adapter in >80% sequences by searching a 10-20 bp string.
grep -m1000 PREDICTEDADAPTER sequence.fastq
An alternative could be to use BBduk, although I have not tried it yet.
Once the adapter string is known, provide it as a parameter to tools such as FastxClipper, Trimmomatic, Cutadapt, etc. You only need to provide the first 20bp of the adapter sequence generally.
Looks like an assignment. Is it one, bio_zhangxl?
yes, I do not know how to do it,but I have to get the result tody? can you give me a hand ,please